Make publish script workable from any directory

This commit is contained in:
Marcel Kapfer 2022-02-15 19:58:26 +01:00
parent 5984dbcdd9
commit 3dbc64f11a
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -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