get_libkate.sh 649 Bytes
Newer Older
1
2
#!/bin/bash

Jan Gerber's avatar
Jan Gerber committed
3
version=0.4.1
4
5
6
7
8
baseurl="http://libkate.googlecode.com/files/libkate-$version.tar.gz"

which wget >& /dev/null
if [ $? -eq 0 ]
then
Jan Gerber's avatar
Jan Gerber committed
9
  test -e "libkate-$version.tar.gz" || wget "$baseurl"
10
11
12
13
else
  which curl >& /dev/null
  if [ $? -eq 0 ]
  then
Jan Gerber's avatar
Jan Gerber committed
14
    test -e "libkate-$version.tar.gz" || curl "$baseurl" -o "libkate-$version.tar.gz"
15
16
17
18
19
20
21
22
23
24
25
26
27
  else
    echo "Neither wget nor curl were found, cannot download libkate"
    exit 1
  fi
fi

if [ $? -ne 0 ]
then
  echo "Failed to download libkate"
  exit 1
fi

tar xfz "libkate-$version.tar.gz"
Jan Gerber's avatar
Jan Gerber committed
28
29
test -L libkate && rm libkate
ln -fs "libkate-$version" libkate
30
cd libkate && ./configure && make && cd lib
31