]> git.ipfire.org Git - thirdparty/mdadm.git/blob - makedist
dae9949b3be87bfd6df1980b7c35bd11c4e54535
[thirdparty/mdadm.git] / makedist
1 #!/bin/sh
2
3 target=${1-~/public_html/source/mdctl}
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 echo version = $version
12 base=mdctl-$version.tgz
13 if [ -f $target/$base ]
14 then
15 echo $target/$base exists.
16 exit 1
17 fi
18 trap "rm $target/$base; exit" 1 2 3
19 ( cd .. ; ln -s mdctl mdctl-$version ; tar czhvf - --exclude='*,v' --exclude='*.o' --exclude mdctl --exclude=RCS mdctl-$version ; rm mdctl-$version ) > $target/$base
20 chmod a+r $target/$base
21 ls -l $target/$base