File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- cd " $( dirname " $( readlink -f " $0 " ) " ) "
3
+ APPIMAGE_ROOT= " $( dirname " $( readlink -f " $0 " ) " ) "
4
4
5
- VERSION=$( readlink bin/emacs | sed -e ' s/emacs-//' )
5
+ VERSION=$( readlink " $APPIMAGE_ROOT / bin/emacs" | sed -e ' s/emacs-//' )
6
6
7
- export EMACSLOADPATH=" $PWD /share/emacs/$VERSION /lisp"
8
- export EMACSDATA=" $PWD /share/emacs/$VERSION /etc"
9
- export EMACSDOC=" $PWD /share/emacs/$VERSION /etc"
10
- export EMACSPATH=" $PWD /libexec/emacs/$VERSION /x86_64-pc-linux-gnu"
11
- export PATH=" $PATH :$PWD /bin"
12
-
13
- CWD=" $PWD "
14
-
15
- cd
7
+ export EMACSLOADPATH=" $APPIMAGE_ROOT /share/emacs/$VERSION /lisp"
8
+ export EMACSDATA=" $APPIMAGE_ROOT /share/emacs/$VERSION /etc"
9
+ export EMACSDOC=" $APPIMAGE_ROOT /share/emacs/$VERSION /etc"
10
+ export EMACSPATH=" $APPIMAGE_ROOT /libexec/emacs/$VERSION /x86_64-pc-linux-gnu"
11
+ export PATH=" $APPIMAGE_ROOT /bin:$PATH "
16
12
17
13
# check --emacs-appimage-run-as argument
18
14
if [ " $1 " = " --emacs-appimage-run-as" ]; then
19
15
shift
20
16
CMD=" $1 "
21
17
shift
22
- exec " $CWD /bin/$CMD " " $@ "
18
+ exec " $APPIMAGE_ROOT /bin/$CMD " " $@ "
23
19
fi
24
20
25
- exec " $CWD /bin/emacs" " $@ "
21
+ exec " $APPIMAGE_ROOT /bin/emacs" " $@ "
You can’t perform that action at this time.
0 commit comments