3 target
=~
/public_html
/source
/mdadm
4 if [ " $arg" = " test" ]
12 else echo $target is not a directory
15 set `grep '^char Version' ReadMe.c `
16 version
=`echo $7 | sed 's/v//'`
17 grep "^.TH MDADM 8 .. v$version" mdadm
.8 > /dev
/null
2>&1 ||
19 echo mdadm
.8 does not mention verion
$version.
22 rpmv
=`echo $version | tr - _`
23 grep "^Version: *$rpmv$" mdadm.spec
> /dev
/null
2>&1 ||
25 echo mdadm.spec does not mention version
$version.
28 if [ -f ANNOUNCE-
$version ]
31 echo ANNOUNCE-
$version does not exist
34 if grep "^ANNOUNCE-$version\$" inventory
36 else { cat inventory
; echo ANNOUNCE-
$version ; } |
sort -o inventory
39 echo version
= $version
40 base
=mdadm-
$version.tgz
41 if [ " $arg" != " diff" ]
43 if [ -f $target/$base ]
45 echo $target/$base exists.
48 trap "rm $target/$base; exit" 1 2 3
49 ( cd ..
; ln -s mdadm.v2 mdadm-
$version ; tar chvf
- --exclude=.git
--exclude="TAGS" --exclude='*~' --exclude=.patches
--exclude='*,v' --exclude='*.o' --exclude mdadm
--exclude=mdadm
'.[^ch0-9]' --exclude=RCS mdadm-
$version ; rm mdadm-
$version ) |
gzip --best > $target/$base
50 chmod a
+r
$target/$base
52 if tar tzf
$target/$base |
sed 's,[^/]*/,,' |
sort |
diff -u inventory
-
53 then : correct files found
54 else echo "Extra files, or inventory is out-of-date"
58 rpmbuild
-ta $target/$base ||
exit 1
59 find /home
/neilb
/src
/RPM
-name "*mdadm-$version-*" \
60 -exec cp {} $target/RPM \
;
61 cp ANNOUNCE-
$version $target/ANNOUNCE
62 cp ChangeLog
$target/ChangeLog
63 if [ " $arg" != " test" ]
65 scp
$target/$base master.kernel.org
:/pub
/linux
/utils
/raid
/mdadm
/mdadm-
$version.
tar.gz
66 scp
$target/ANNOUNCE
$target/ChangeLog master.kernel.org
:/pub
/linux
/utils
/raid
/mdadm
/
69 if [ ! -f $target/$base ]
71 echo $target/$base does not exist.
74 ( cd ..
; ln -s mdadm.v2 mdadm-
$version ; tar chf
- --exclude=.git
--exclude="TAGS" --exclude='*,v' --exclude='*~' --exclude='*.o' --exclude mdadm
--exclude=mdadm
'.[^ch0-9]' --exclude=RCS mdadm-
$version ; rm mdadm-
$version ) |
gzip --best > /var
/tmp
/mdadm-new.tgz
75 mkdir
/var
/tmp
/mdadm-old
; zcat
$target/$base |
( cd /var
/tmp
/mdadm-old
; tar xf
- )
76 mkdir
/var
/tmp
/mdadm-new
; zcat
/var
/tmp
/mdadm-new.tgz |
( cd /var
/tmp
/mdadm-new
; tar xf
- )
77 diff -ru /var
/tmp
/mdadm-old
/var
/tmp
/mdadm-new
78 rm -rf /var
/tmp
/mdadm-old
/var
/tmp
/mdadm-new
/var
/tmp
/mdadm-new.tgz