diff --git a/base/voidlinux.sh b/base/voidlinux.sh index 8f766f2..b669dc7 100755 --- a/base/voidlinux.sh +++ b/base/voidlinux.sh @@ -1,4 +1,8 @@ #!/bin/sh +# base OS tweaks. +# the script assumes SYSUPDATES_CHANNEL env var is set to the desired changes +# channel, whatever the update.sh accept which is typically "dev" or "master". + # try to ensure sysupdates are running regularily before doing anoything else xbps-install -y snooze ln -sfT /etc/sv/snooze-hourly /var/service/snooze-hourly @@ -11,7 +15,7 @@ if [ ! -f /etc/cron.hourly/sysupdate ]; then # run updates approx. every hour cat < /etc/cron.hourly/sysupdate #!/bin/sh -exec /ssd/sysupdates/update.sh +exec /ssd/sysupdates/update.sh "$SYSUPDATES_CHANNEL" EOF chmod +x /etc/cron.hourly/sysupdate fi diff --git a/update.sh b/update.sh index 164853e..01d0a5d 100755 --- a/update.sh +++ b/update.sh @@ -9,6 +9,7 @@ # after user confirmation. # git branch to pull from. defaults to master. +# another value is "dev", for a development aka unstable version. BRANCH="${1:-master}" # output everything to a temp file and print its contents only in case of an error, # so that when run via a cronjob, the output is empty on success which prevents @@ -45,6 +46,7 @@ if [ $? -ne 0 ]; then fi # run repo's update script +export SYSUPDATES_CHANNEL="$BRANCH" ./apply.sh >> $LOGFILE 2>&1 if [ $? -ne 0 ]; then echo "ERROR: apply failed"