OSDN Git Service

GUI translation with Designer
[handbrake-jp/handbrake-jp.git] / DownloadMacOsXContribBinaries.sh
1 #! /bin/sh
2
3 # Incremented every time a new contrib package is available
4 VERSION=`cat MacOsXContribBinariesVersion.txt`
5
6 if [ -f contrib/DarwinContribVersion.txt ]; then
7   if [ "`cat contrib/DarwinContribVersion.txt`" = $VERSION ]; then
8     echo "Contribs are up to date."
9     exit 0
10   fi
11 fi
12
13 HOST=download.m0k.org
14 #HOST=download.mediafork.dynalias.com
15 #HOST=sr55.ashosted.com
16 FILE=contribbin-darwin-$VERSION.tar.gz
17 #URL=http://$HOST/contrib/$FILE
18 URL=http://$HOST/handbrake/contrib/$FILE
19 # Check for internet connectivity
20 if ! host $HOST > /dev/null 2>&1; then
21   echo "Please connect to the Internet (could not resolve $HOST)."
22   exit 1
23 fi
24
25 # Look for something that can handle an HTTP download
26   WGET="curl -L -O"
27
28 # Get and install the package
29 echo "Getting contribs ($VERSION)..."
30 ( cd contrib && rm -f $FILE && $WGET $URL && rm -Rf lib include && \
31   tar xzf $FILE && ranlib lib/*.a ) || exit 1
32
33 exit 0
34