Enhance-Get Version automatically (#28)
fetch the latest version automatically
This commit is contained in:
parent
370c880fd8
commit
a0b0016a40
|
|
@ -11,10 +11,14 @@ apt-get install -y --force-yes freeswitch-video-deps-most
|
|||
|
||||
#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
|
||||
cd /usr/src && wget http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.9.zip
|
||||
unzip freeswitch-1.6.9.zip
|
||||
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)
|
||||
SWITCH_VERSION=$(git ls-remote --tags https://freeswitch.org/stash/scm/fs/freeswitch.git v$SWITCH_MAJOR.* | cut -d/ -f3 | sort | tail -n1 | cut -dv -f2)
|
||||
echo "Using version $SWITCH_VERSION"
|
||||
cd /usr/src
|
||||
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$SWITCH_VERSION.zip
|
||||
unzip freeswitch-$SWITCH_VERSION.zip
|
||||
rm -R freeswitch
|
||||
cp -R freeswitch-1.6.9 freeswitch
|
||||
mv freeswitch-$SWITCH_VERSION freeswitch
|
||||
cd freeswitch
|
||||
|
||||
#./bootstrap.sh -j
|
||||
|
|
|
|||
Loading…
Reference in New Issue