Make publish script workable from any directory
This commit is contained in:
parent
5984dbcdd9
commit
3dbc64f11a
1 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
emacs -Q --script ./publish.el
|
set -euo pipefail
|
||||||
|
|
||||||
|
PUBLISH_SCRIPT_PATH=./publish/publish.el
|
||||||
|
EMACS_CONF_DIR=~/.emacs.d
|
||||||
|
CURRENT_DIR=$(pwd)
|
||||||
|
|
||||||
|
function goBack() {
|
||||||
|
cd "$CURRENT_DIR"
|
||||||
|
}
|
||||||
|
trap goBack EXIT
|
||||||
|
|
||||||
|
cd "$EMACS_CONF_DIR" || exit
|
||||||
|
emacs -Q --script ./publish/publish.el
|
||||||
|
|
Loading…
Reference in a new issue