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 2 years ago
parent aee0b8a3aa
commit 57d9548b84
Signed by: x1ddos
GPG Key ID: 540189B756BF5B12

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

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

Loading…
Cancel
Save