From f212f4d57f9ded65e30f8c75567bc9d656160421 Mon Sep 17 00:00:00 2001 From: David Olofson Date: Sat, 4 Feb 2017 02:23:07 +0100 Subject: [PATCH] Nicer dependency install-* scripts install-audiality2.sh now aborts if Audiality 2 development files are already installed in the system. If the repository is already in place, the script performs a 'git pull' on it, instead of trying (and failing) to clone it. install-full-data.sh now checks if the repository and symlink are present, acts accordingly. install-demo-data.sh and install-win32-redist.sh now abort if the respective directories are already in place. The scripts now have variables at the top for archive names and versions. --- install-audiality2.sh | 18 +++++++++++++++--- install-demo-data.sh | 16 +++++++++++++--- install-full-data.sh | 22 ++++++++++++++++++---- install-win32-redist.sh | 13 +++++++------ 4 files changed, 53 insertions(+), 16 deletions(-) diff --git a/install-audiality2.sh b/install-audiality2.sh index 1ad9379..d378dc6 100755 --- a/install-audiality2.sh +++ b/install-audiality2.sh @@ -1,8 +1,20 @@ #!/bin/sh +A2RELEASE=v1.9.2 + +if pkg-config audiality2 --exists; then + echo "Audiality 2 already installed on the system!" + exit +fi + set -ex -git clone https://github.com/olofson/audiality2.git -cd audiality2 -git checkout v1.9.2 +if [ ! -d "audiality2" ]; then + git clone https://github.com/olofson/audiality2.git + cd audiality2 +else + cd audiality2 + git pull +fi +git checkout ${A2RELEASE} mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=OFF -DUSE_ALSA=NO -DUSE_JACK=NO .. && make && sudo make install diff --git a/install-demo-data.sh b/install-demo-data.sh index 9a58da4..926c004 100755 --- a/install-demo-data.sh +++ b/install-demo-data.sh @@ -1,5 +1,15 @@ #!/bin/sh +DEMOARC="KoboRedux-Demo-0.7.2-Data.tar.bz2" + +if [ -d "demo-data" ]; then + echo "Demo data files (demo-data) already in place!" + exit +fi + set -ex -wget http://koboredux.com/download/KoboRedux-Demo-0.7.2-Data.tar.bz2 -tar -xjvf KoboRedux-Demo-0.7.2-Data.tar.bz2 -mv KoboRedux-Demo-0.7.2-Data demo-data + +mkdir demo-data +cd demo-data +wget "http://koboredux.com/download/${DEMOARC}" +tar -xjvf ${DEMOARC} --strip-components=1 +rm ${DEMOARC} diff --git a/install-full-data.sh b/install-full-data.sh index 9375fd6..4333ced 100755 --- a/install-full-data.sh +++ b/install-full-data.sh @@ -1,7 +1,21 @@ #!/bin/sh +RELEASE=v0.7.2 + set -ex -git clone git@github.com:olofson/koboreduxassets.git -cd koboreduxassets -git checkout v0.7.2 + +if [ !-d "koboreduxassets" ]; then + git clone git@github.com:olofson/koboreduxassets.git + cd koboreduxassets +else + cd koboreduxassets + git checkout master + git pull +fi + +git checkout ${RELEASE} + cd .. -ln -s koboreduxassets/data full-data + +if [ ! -L full-data ]; then + ln -s koboreduxassets/data full-data +fi diff --git a/install-win32-redist.sh b/install-win32-redist.sh index 591c165..d29cce8 100755 --- a/install-win32-redist.sh +++ b/install-win32-redist.sh @@ -1,4 +1,6 @@ #!/bin/sh +REDISTARCH="koboredux-libs-redist-win32.tar.bz2" +A2RELEASE=v1.9.2 if [ -d "win32-redist" ]; then echo "Win32 redistributables (win32-redist) already in place!" @@ -8,16 +10,15 @@ fi set -ex mkdir win32-redist - -# Grab Win32 DLL package from koboredux.com -wget http://koboredux.com/download/koboredux-libs-redist-win32.tar.bz2 cd win32-redist -tar -xjvf ../koboredux-libs-redist-win32.tar.bz2 --strip-components=1 -# (NOTE: We're still in win32-redist...) +# Grab Win32 DLL package from koboredux.com +wget "http://koboredux.com/download/${REDISTARCH}" +tar -xjvf ${REDISTARCH} --strip-components=1 +rm ${REDISTARCH} # Grab Audiality2 DLL and COPYING file from GitHub -wget https://github.com/olofson/audiality2/releases/download/v1.9.2/libaudiality2.dll +wget "https://github.com/olofson/audiality2/releases/download/${A2RELEASE}/libaudiality2.dll" wget https://raw.githubusercontent.com/olofson/audiality2/master/COPYING awk 'sub("$", "\r")' COPYING > LICENSE-Audiality2.txt rm COPYING