Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/pulseaudio-module-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt335672 <30179339+matt335672@users.noreply.github.com>2022-02-25 14:15:41 +0300
committermatt335672 <30179339+matt335672@users.noreply.github.com>2022-02-25 14:15:41 +0300
commit08f0ae1224de7acdb29611df192b096ebc8f2c76 (patch)
treecd20e0a79edf8ef03f12f2ae66ae64598b87e108
parent4d572a75498585a747cb83bd06e3a1405b4ee8c3 (diff)
Add mirror and keyring support to install_pulseaudio_sources_apt_wrapper.sh
-rwxr-xr-xscripts/install_pulseaudio_sources_apt_wrapper.sh35
1 files changed, 32 insertions, 3 deletions
diff --git a/scripts/install_pulseaudio_sources_apt_wrapper.sh b/scripts/install_pulseaudio_sources_apt_wrapper.sh
index 27331cf..04d336f 100755
--- a/scripts/install_pulseaudio_sources_apt_wrapper.sh
+++ b/scripts/install_pulseaudio_sources_apt_wrapper.sh
@@ -19,6 +19,10 @@
# Wrapper to call install_pulseaudio_sources.sh and tidy up afterwards
+# The command line switches --mirror= and --keyring= can be specified if
+# these switches are needed for a system based on Debian (e.g. a Raspberry
+# Pi)
+
# ---------------------------------------------------------------------------
# G L O B A L S
# ---------------------------------------------------------------------------
@@ -98,6 +102,29 @@ RunWrappedScript()
# M A I N
# -----------------------------------------------------------------------------
+debootstrap_mirror=""
+debootstrap_switches=""
+
+# Parse command line switches
+while [ -n "$1" ]; do
+ case "$1" in
+ --mirror=*)
+ debootstrap_mirror="${1#--mirror=}"
+ ;;
+ --keyring=*)
+ file="${1#--keyring=}"
+ if [ -f "$file" ]; then
+ debootstrap_switches="$debootstrap_switches $1"
+ else
+ echo "** Ignoring missing keyring $1" >&2
+ fi
+ ;;
+ *) echo "** Unrecognised parameter '$1'" >&2
+ exit 1
+ esac
+ shift
+done
+
# Start with a few sanity checks
if [ -d $PULSE_DIR ]; then
echo "** Target directory $PULSE_DIR already exists" >&2
@@ -127,8 +154,10 @@ fi
# Create the build root
log=/var/tmp/pa-build-$USER-debootstrap.log
echo "- Creating $distro build root. Log file in $log"
-sudo debootstrap $distro $BUILDROOT >$log 2>&1 || {
- echo "** debootstrap failed. Check log file" >&2
+sudo debootstrap \
+ $debootstrap_switches \
+ $distro $BUILDROOT "$debootstrap_mirror" >$log 2>&1 || {
+ echo "** debootstrap failed. Check log file $log" >&2
exit 1
}
@@ -159,7 +188,7 @@ sudo chmod +x $BUILDROOT/wrapped_script || exit $?
log=/var/tmp/pa-build-$USER-schroot.log
echo "- Building PA sources. Log file in $log"
RunWrappedScript >$log 2>&1 || {
- echo "** schroot failed. Check log file" >&2
+ echo "** schroot failed. Check log file $log" >&2
exit 1
}