]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - makedist
mdadm-0.7.1
[thirdparty/mdadm.git] / makedist
index 789a80a7fc3ef6cc1d581fad4badc35fd262566f..6ab4ca36836802a9988e3ad3432ba1f7cf5425b6 100755 (executable)
--- a/makedist
+++ b/makedist
@@ -1,20 +1,26 @@
 #!/bin/sh
 
-target=${1-~/public_html/source/mdctl}
+target=${1-~/public_html/source/mdadm}
 if [ -d $target ]
 then :
 else echo $target is not a directory
      exit 2
 fi
 set `grep '^char Version' ReadMe.c `
-echo version = $7
-base=mdctl-$7.tgz
+version=`echo $7 | sed 's/v//'`
+grep "^Version: $version$" mdadm.spec > /dev/null 2>&1 || 
+ {
+   echo mdadm.conf does not mention version $version.
+   exit 1
+ }
+echo version = $version
+base=mdadm-$version.tgz
 if [ -f $target/$base ] 
 then 
   echo $target/$base exists.
   exit 1
 fi
 trap "rm $target/$base; exit" 1 2 3
-( cd .. ; tar czvf - mdctl )  > $target/$base
+( cd .. ; ln -s mdadm mdadm-$version ; tar czhvf - --exclude='*,v' --exclude='*.o' --exclude mdadm --exclude=RCS mdadm-$version ; rm mdadm-$version )  > $target/$base
 chmod a+r $target/$base
 ls -l $target/$base