summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-04-20 14:52:18 +0200
committerRobin Gareus <robin@gareus.org>2013-04-20 14:52:18 +0200
commita366fba7d0933a8f2d97d95fefcbcdc9692d2117 (patch)
tree23e5ab736974e46e82d6fbdcf8094d95b912e4e7 /tools
parentd1c4910f13bcc58fc897b164542d89c0e0b13677 (diff)
refine video-tools installer:
* arch/platform detection * curl progress-bar
Diffstat (limited to 'tools')
-rwxr-xr-xtools/videotimeline/install_video_tools.sh55
1 files changed, 48 insertions, 7 deletions
diff --git a/tools/videotimeline/install_video_tools.sh b/tools/videotimeline/install_video_tools.sh
index 28d31f748c..8ad900a99e 100755
--- a/tools/videotimeline/install_video_tools.sh
+++ b/tools/videotimeline/install_video_tools.sh
@@ -6,6 +6,42 @@ if test -z "$(which curl)"; then
exit 1
fi
+###############################################################################
+### look-up architecture
+
+case $(uname -m) in
+ i[3456789]86|x86|i86pc)
+ echo "Architecture is x86"
+ MULTIARCH="i386"
+ ;;
+ x86_64|amd64|AMD64)
+ echo "Architecture is x86_64"
+ MULTIARCH="x86_64"
+ ;;
+ *)
+ echo
+ echo "ERROR: Unknown architecture `uname -m`" >&2
+ exit 1
+ ;;
+esac
+
+case $(uname) in
+ Linux|linux)
+ MULTIARCH="${MULTIARCH}-linux-gnu"
+ ;;
+ *)
+ echo
+ echo "ERROR: Platform `uname` is not supported by this script" >&2
+ exit 1
+ ;;
+esac
+
+echo "Multiarch triplet is '$MULTIARCH'"
+
+
+###############################################################################
+### install target directory
+
checkdir () {
DUT="$1"
CHECKPATH="${2:-yes}"
@@ -90,16 +126,21 @@ done
###############################################################################
### actual install procedure
-echo "installing video-tools to '${TARGETDIR}'.."
-exit
+
+echo "installing video-tools to '${TARGETDIR}'."
cd "$TARGETDIR" || exit 1
-HARVID_VERSION=$(curl http://ardour.org/files/video-tools/harvid_version.txt)
-curl -L http://ardour.org/files/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
+HARVID_VERSION=$(curl -s http://ardour.org/files/video-tools/harvid_version.txt)
+echo "Downloading harvid-${MULTIARCH}-${HARVID_VERSION}."
+curl -L --progress-bar \
+ http://ardour.org/files/video-tools/harvid-${MULTIARCH}-${HARVID_VERSION}.tgz \
| tar -x -z --exclude=README --exclude=harvid.1 --strip-components=1 || exit 1
-XJADEO_VERSION=$(curl http://ardour.org/files/video-tools/xjadeo_version.txt)
-curl -L http://ardour.org/files/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
+
+XJADEO_VERSION=$(curl -s http://ardour.org/files/video-tools/xjadeo_version.txt)
+echo "Downloading xjadeo-${MULTIARCH}-${XJADEO_VERSION}."
+curl -L --progress-bar \
+ http://ardour.org/files/video-tools/xjadeo-${MULTIARCH}-${XJADEO_VERSION}.tgz \
| tar -x -z --exclude=README --exclude=xjadeo.1 --strip-components=1 || exit 1
mv xjadeo xjremote
-echo "ardour video tools installed successfully"
+echo "ardour video tools installed successfully."