/[scripts]/trunk/est-latest.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/est-latest.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29 - (show annotations)
Sat May 26 23:16:58 2007 UTC (16 years, 10 months ago) by dpavlin
File MIME type: application/x-sh
File size: 1679 byte(s)
fine-tune script (old changes, not commited)

1 #!/bin/sh
2
3 sudo echo "Cache credentials for sudo..."
4
5 function check_upstream() {
6 what="$1"
7 upstream=`wget -O - http://${what}.sourceforge.net/ -o /dev/null | grep "Latest Source Package" | cut -d\" -f2`
8
9 echo "Upstream version of $what is $upstream"
10
11 if echo $upstream | grep 'http://' ; then
12 wget -nc -c $upstream
13 else
14 wget -nc -c http://${what}.sourceforge.net/$upstream
15 fi
16
17 upstream_ver=`echo $upstream | cut -d- -f2 | sed 's/\.tar.gz//'`
18 }
19
20 d=`pwd`
21 tmp="/tmp/est-latest"
22
23 function extract() {
24 arc="$1"
25
26 name=`echo $arc | cut -d- -f1`
27 ver=`echo $arc | cut -d- -f2 | sed 's/\.tar.gz//'`
28
29 if dpkg -l "$name" | grep "^ii" | grep "$ver" 2>&1 >/dev/null ; then
30 echo "Skipping $name [$ver], allready installed."
31 return
32 fi
33
34 mkdir $tmp
35 cd $tmp
36
37 opt=""
38 if [ "$name" == "qdbm" ] ; then
39 opt="--enable-gzip"
40 echo "remove current hyperestraier because we will rebuild qdbm..."
41 sudo apt-get remove -y hyperestraier
42 fi
43
44 echo "Extracting $name [$ver] to $tmp"
45 tar xvfz "$d/$arc"
46 cd *
47 ./configure
48 make
49 sudo checkinstall -y
50
51 # build perl bindings?
52 test -d perlnative && (
53 echo "*** installing native perl bindings"
54 cd perlnative
55 ./configure
56 make
57 sudo make install
58 )
59
60 cd $d
61 sudo rm -Rf $tmp
62 }
63
64 dpkg -l | awk '{ print $2 }' | egrep '^lib(estraier|qdbm)' | xargs sudo apt-get remove -y
65
66 qdbm_ver="$1"
67 est_ver="$2"
68
69 if [ -z "$qdbm_ver" ] ; then
70 check_upstream 'qdbm'
71 extract "qdbm-${upstream_ver}.tar.gz"
72 else
73 extract `ls -m qdbm-${qdbm_ver}.tar.gz | head -1`
74 fi
75
76 if [ -z "$est_ver" ] ; then
77 check_upstream 'hyperestraier'
78 extract "hyperestraier-${upstream_ver}.tar.gz"
79 else
80 extract `ls -m hyperestraier-${est_ver}.tar.gz | head -1`
81 fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26