apply: make sure each stage starts off back from the repo root dir

the apply.sh script should assume current directory is arbitrary after
executing each step: base, bitcoin, lnd and so on.

this commit simply changes current dir to the repo root before executing
every step.
dev
alex 2023-02-06 17:39:01 +01:00
parent aee0b8a3aa
commit 57d9548b84
Signed by: x1ddos
GPG Key ID: 540189B756BF5B12
2 changed files with 6 additions and 0 deletions

View File

@ -3,15 +3,20 @@
# it must be run as root or a user with equivalent privileges.
exit_code=0
# defined in the caller script
rootdir="$SYSUPDATES_ROOTDIR"
# base os
cd "$rootdir"
./base/voidlinux.sh || exit 1
# bitcoin core
cd "$rootdir"
. ./btc/env
bitcoin_apply || exit_code=$?
# lnd lightning
cd "$rootdir"
. ./lnd/env
lnd_apply || exit_code=$?

View File

@ -46,6 +46,7 @@ if [ $? -ne 0 ]; then
fi
# run repo's update script
export SYSUPDATES_ROOTDIR="$REPODIR"
export SYSUPDATES_CHANNEL="$BRANCH"
./apply.sh >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then