From 9a524b432951c72d5411ae77a38da5c6d3ab2f92 Mon Sep 17 00:00:00 2001 From: Mafoo Date: Tue, 5 Jul 2016 18:00:20 +0100 Subject: [PATCH] BugFix-source-release (#27) source-release was cding out of the base dir so was causing following commands to fail as they were no longer correctly relative Added store and return for the working directory --- debian/resources/switch/source-release.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/resources/switch/source-release.sh b/debian/resources/switch/source-release.sh index e4c05c6..4be0739 100755 --- a/debian/resources/switch/source-release.sh +++ b/debian/resources/switch/source-release.sh @@ -9,6 +9,8 @@ echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /e apt-get update && apt-get upgrade apt-get install -y --force-yes freeswitch-video-deps-most +#we are about to move out of the executing directory so we need to preserve it to return after we are done +CWD=$(pwd) #git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch #git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch SWITCH_MAJOR=$(git ls-remote --heads https://freeswitch.org/stash/scm/fs/freeswitch.git "v*" | cut -d/ -f 3 | grep -P '^v\d+\.\d+' | sort | tail -n 1| cut -dv -f2) @@ -39,6 +41,9 @@ make sounds-install moh-install make hd-sounds-install hd-moh-install make cd-sounds-install cd-moh-install +#return to the executing directory +cd $CWD + useradd freeswitch #configure system service