]> Pileus Git - ~andy/fetchmail/blob - trio/maketgz
Update website for 6.3.24.
[~andy/fetchmail] / trio / maketgz
1 #! /bin/sh
2 # Script to build archives with
3 #
4
5 echo "Version number?"
6 read version
7
8 # get current dir
9 dir=`pwd`
10
11 # Get basename
12 orig=`basename $dir`
13
14 # Get the left part of the dash (-)
15 new=`echo $orig | cut -d- -f1`
16
17 # Build new directory name
18 n=$new-$version;
19
20 # Tell the world what we're doing
21 echo "creates $n.tar.gz";
22
23 if [ -r $n ]; then
24   echo "Directory already exists!"
25   exit
26 fi
27
28 # Create the new dir
29 mkdir $n
30
31 # Copy all relevant files, with path and permissions!
32 tar -cf - `cat FILES` | (cd $n; tar -xBpf -) || exit 1
33
34 (cd $n && sh autogen.sh) || exit 1
35
36 # Make a tar archive of it all
37 tar -cvf $n.tar $n
38
39 # gzip the archive
40 gzip $n.tar
41
42 # Make it world readable
43 chmod a+r $n.tar.gz ;
44
45 # Delete the temp dir
46 rm -rf $n