Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1#!@bash@
2
3IFS=:
4
5newLoadPath=()
6newNativeLoadPath=()
7added=
8
9if [[ -n $EMACSLOADPATH ]]
10then
11 while read -rd: entry
12 do
13 if [[ -z $entry && -z $added ]]
14 then
15 newLoadPath+=(@wrapperSiteLisp@)
16 added=1
17 fi
18 newLoadPath+=("$entry")
19 done <<< "$EMACSLOADPATH:"
20else
21 newLoadPath+=(@wrapperSiteLisp@)
22 newLoadPath+=("")
23fi
24
25if [[ -n $EMACSNATIVELOADPATH ]]
26then
27 while read -rd: entry
28 do
29 if [[ -z $entry && -z $added ]]
30 then
31 newNativeLoadPath+=(@wrapperSiteLispNative@)
32 added=1
33 fi
34 newNativeLoadPath+=("$entry")
35 done <<< "$EMACSNATIVELOADPATH:"
36else
37 newNativeLoadPath+=(@wrapperSiteLispNative@)
38 newNativeLoadPath+=("")
39fi
40
41export EMACSLOADPATH="${newLoadPath[*]}"
42export emacsWithPackages_siteLisp=@wrapperSiteLisp@
43
44export EMACSNATIVELOADPATH="${newNativeLoadPath[*]}"
45export emacsWithPackages_siteLispNative=@wrapperSiteLispNative@
46
47exec @prog@ "$@"