]> git.ipfire.org Git - thirdparty/mdadm.git/blob - makedist
7ead17afc097691e82d1bc38037012d776ddca64
[thirdparty/mdadm.git] / makedist
1 #!/bin/sh
2
3 target=${1-~/public_html/source/mdadm}
4 if [ -d $target ]
5 then :
6 else echo $target is not a directory
7 exit 2
8 fi
9 set `grep '^char Version' ReadMe.c `
10 version=`echo $7 | sed 's/v//'`
11 grep "^Version: *$version$" mdadm.spec > /dev/null 2>&1 ||
12 {
13 echo mdadm.spec does not mention version $version.
14 exit 1
15 }
16 echo version = $version
17 base=mdadm-$version.tgz
18 if [ -f $target/$base ]
19 then
20 echo $target/$base exists.
21 exit 1
22 fi
23 trap "rm $target/$base; exit" 1 2 3
24 ( cd .. ; ln -s mdadm mdadm-$version ; tar chvf - --exclude='*,v' --exclude='*.o' --exclude mdadm --exclude=mdadm'.[^ch0-9]' --exclude=RCS mdadm-$version ; rm mdadm-$version ) | gzip --best > $target/$base
25 chmod a+r $target/$base
26 ls -l $target/$base
27
28 rpm -ta $target/$base
29 find /home/neilb/src/RPM -name "*mdadm-$version-*" \
30 -exec cp {} $target/RPM \;