/[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

Annotation of /trunk/est-latest.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (hide annotations)
Fri Mar 9 00:58:26 2007 UTC (17 years ago) by dpavlin
File MIME type: application/x-sh
File size: 1433 byte(s)
build perl native bindings also

1 dpavlin 22 #!/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 dpavlin 23 if echo $upstream | grep 'http://' ; then
12 dpavlin 22 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 dpavlin 24 if dpkg -l "$name" | grep "^ii" | grep "$ver" 2>&1 >/dev/null ; then
28 dpavlin 22 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 dpavlin 27
42     # build perl bindings?
43     test -d perlnative && (
44     echo "*** installing native perl bindings"
45     cd perlnative
46     ./configure
47     make
48     sudo make install
49     )
50    
51 dpavlin 22 cd $d
52     sudo rm -Rf $tmp
53     }
54    
55 dpavlin 24 dpkg -l | awk '{ print $2 }' | egrep '^lib(estraier|qdbm)' | xargs apt-get remove -y
56    
57 dpavlin 26 qdbm_ver="$1"
58     est_ver="$2"
59 dpavlin 22
60 dpavlin 26 if [ -z "$qdbm_ver" ] ; then
61     check_upstream 'qdbm'
62     extract `ls -d qdbm-*.tar.gz | tail -1`
63     else
64     extract `ls -d qdbm-${qdbm_ver}.tar.gz | tail -1`
65     fi
66 dpavlin 22
67 dpavlin 26 if [ -z "$est_ver" ] ; then
68     check_upstream 'hyperestraier'
69     extract `ls -d hyperestraier-*.tar.gz | tail -1`
70     else
71     extract `ls -d hyperestraier-${est_ver}.tar.gz | tail -1`
72     fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26