Skip to content

Commit

Permalink
Nicer dependency install-* scripts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
olofson committed Feb 4, 2017
1 parent 59897d9 commit f212f4d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 16 deletions.
18 changes: 15 additions & 3 deletions install-audiality2.sh
Original file line number Diff line number Diff line change
@@ -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
16 changes: 13 additions & 3 deletions install-demo-data.sh
Original file line number Diff line number Diff line change
@@ -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}
22 changes: 18 additions & 4 deletions install-full-data.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
#!/bin/sh
RELEASE=v0.7.2

set -ex
git clone [email protected]:olofson/koboreduxassets.git
cd koboreduxassets
git checkout v0.7.2

if [ !-d "koboreduxassets" ]; then
git clone [email protected]: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
13 changes: 7 additions & 6 deletions install-win32-redist.sh
Original file line number Diff line number Diff line change
@@ -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!"
Expand All @@ -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

0 comments on commit f212f4d

Please sign in to comment.