/[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 26 - (show annotations)
Sat Jun 24 15:04:40 2006 UTC (17 years, 9 months ago) by dpavlin
File MIME type: application/x-sh
File size: 1277 byte(s)
adds parametars to specify qdbm and hyperestraier versions

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
18 d=`pwd`
19 tmp="/tmp/est-latest"
20
21 function extract() {
22 arc="$1"
23
24 name=`echo $arc | cut -d- -f1`
25 ver=`echo $arc | cut -d- -f2 | sed 's/\.tar.gz//'`
26
27 if dpkg -l "$name" | grep "^ii" | grep "$ver" 2>&1 >/dev/null ; then
28 echo "Skipping $name [$ver], allready installed."
29 return
30 fi
31
32 mkdir $tmp
33 cd $tmp
34
35 echo "Extracting $name [$ver] to $tmp"
36 tar xvfz "$d/$arc"
37 cd *
38 ./configure
39 make
40 sudo checkinstall -y
41 cd $d
42 sudo rm -Rf $tmp
43 }
44
45 dpkg -l | awk '{ print $2 }' | egrep '^lib(estraier|qdbm)' | xargs apt-get remove -y
46
47 qdbm_ver="$1"
48 est_ver="$2"
49
50 if [ -z "$qdbm_ver" ] ; then
51 check_upstream 'qdbm'
52 extract `ls -d qdbm-*.tar.gz | tail -1`
53 else
54 extract `ls -d qdbm-${qdbm_ver}.tar.gz | tail -1`
55 fi
56
57 if [ -z "$est_ver" ] ; then
58 check_upstream 'hyperestraier'
59 extract `ls -d hyperestraier-*.tar.gz | tail -1`
60 else
61 extract `ls -d hyperestraier-${est_ver}.tar.gz | tail -1`
62 fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26