]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - makedist
mdadm-1.1.0
[thirdparty/mdadm.git] / makedist
index 789a80a7fc3ef6cc1d581fad4badc35fd262566f..8b01af9caec9b4a9e9245873f36c5b1d8b5aa613 100755 (executable)
--- a/makedist
+++ b/makedist
@@ -1,20 +1,30 @@
 #!/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.spec 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 chvf - --exclude="TAGS" --exclude='*,v' --exclude='*.o' --exclude mdadm --exclude=mdadm'.[^ch0-9]' --exclude=RCS mdadm-$version ; rm mdadm-$version ) | gzip --best > $target/$base
 chmod a+r $target/$base
 ls -l $target/$base
+
+rpm -ta $target/$base
+find /home/neilb/src/RPM -name "*mdadm-$version-*" \
+ -exec cp {} $target/RPM \;