OSDN Git Service

Removed beos tree as deprecated
[handbrake-jp/handbrake-jp-git.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.mediafork.dynalias.com
14 FILE=contribbin-darwin-$VERSION.tar.gz
15 URL=http://$HOST/contrib/$FILE
16
17 # Check for internet connectivity
18 if ! host $HOST > /dev/null 2>&1; then
19   echo "Please connect to the Internet (could not resolve $HOST)."
20   exit 1
21 fi
22
23 # Look for something that can handle an HTTP download
24   WGET="curl -L -O"
25
26 # Get and install the package
27 echo "Getting contribs ($VERSION)..."
28 ( cd contrib && rm -f $FILE && $WGET $URL && rm -Rf lib include && \
29   tar xzf $FILE && ranlib lib/*.a ) || exit 1
30
31 exit 0
32