Use http_proxy and allow reboot after update

This commit is contained in:
Tony Garnock-Jones 2022-02-06 23:10:54 +01:00
parent 17e8c335b5
commit 0a795897be
1 changed files with 8 additions and 2 deletions

View File

@ -5,10 +5,11 @@
set -eu
SUDOPASS=${SUDOPASS:-user}
REBOOT_AFTER_TRANSMOGRIFY=${REBOOT_AFTER_TRANSMOGRIFY:-}
if [ $(id -u) -ne 0 ]
then
echo ${SUDOPASS} | sudo -S "$0" "$@"
echo ${SUDOPASS} | sudo -S "REBOOT_AFTER_TRANSMOGRIFY=${REBOOT_AFTER_TRANSMOGRIFY}" "$0" "$@"
exit $?
fi
echo
@ -17,7 +18,7 @@ cp synit-apk-key.pub /etc/apk/keys/.
. /etc/deviceinfo
ls packages/$deviceinfo_arch/
sudo apk add -X `pwd`/packages \
http_proxy=http://10.0.2.2:3128/ apk add -X `pwd`/packages \
preserves-tools \
squeak-cog-vm \
syndicate-sh \
@ -27,3 +28,8 @@ sudo apk add -X `pwd`/packages \
rm -f /etc/syndicate/squeak.pr
cp -p `pwd`/squeak.pr /etc/syndicate/squeak.pr
if [ -n "$REBOOT_AFTER_TRANSMOGRIFY" ]
then
reboot
fi