From 3c91e5d74b7e7d8b101ccb8968879d29180c794d Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 9 Feb 2022 15:49:17 +0100 Subject: [PATCH] Fix http_proxy in transmogrity; add mpg123 --- transmogrify.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/transmogrify.sh b/transmogrify.sh index a6997c4..2d68bb5 100755 --- a/transmogrify.sh +++ b/transmogrify.sh @@ -6,7 +6,16 @@ set -eu SUDOPASS=${SUDOPASS:-user} REBOOT_AFTER_TRANSMOGRIFY=${REBOOT_AFTER_TRANSMOGRIFY:-} -http_proxy=${http_proxy:-http://10.0.2.2:3128/} + +if [ -z "${http_proxy:-}" ] +then + if ip a | grep -q -F 10.0.2 + then + http_proxy=http://10.0.2.2:3128/ + else + http_proxy= + fi +fi if [ $(id -u) -ne 0 ] then @@ -23,6 +32,7 @@ cp synit-apk-key.pub /etc/apk/keys/. . /etc/deviceinfo ls packages/$deviceinfo_arch/ +echo "Will use http_proxy=${http_proxy}" apk add -X `pwd`/packages \ preserves-tools \ squeak-cog-vm \ @@ -31,6 +41,7 @@ apk add -X `pwd`/packages \ \ alsa-utils \ qmi-utils \ + mpg123 \ \ docker