Add support for MD5SUMS.
This commit is contained in:
parent
b74a568127
commit
9a954ba018
|
@ -378,7 +378,7 @@ image: check-number-given images
|
||||||
|
|
||||||
# Calculate the md5sums for the images (if available), or get from templates
|
# Calculate the md5sums for the images (if available), or get from templates
|
||||||
imagesums:
|
imagesums:
|
||||||
$(Q)$(BASEDIR)/tools/imagesums $(OUT)
|
$(Q)$(BASEDIR)/tools/imagesums $(OUT) $(SUMS_EXTENSION)
|
||||||
|
|
||||||
## MISC TARGETS ##
|
## MISC TARGETS ##
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,19 @@
|
||||||
|
|
||||||
cd $1
|
cd $1
|
||||||
|
|
||||||
:> MD5SUMS
|
if [ "$2"x != ""x ] ; then
|
||||||
:> SHA1SUMS
|
EXT=".$2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
:> MD5SUMS$EXT
|
||||||
|
:> SHA1SUMS$EXT
|
||||||
|
|
||||||
case $DOJIGDO in
|
case $DOJIGDO in
|
||||||
0)
|
0)
|
||||||
for file in `find * -name \*.iso`
|
for file in `find * -name \*.iso`
|
||||||
do
|
do
|
||||||
md5sum $file >> MD5SUMS
|
md5sum $file >> MD5SUMS$EXT
|
||||||
sha1sum $file >> SHA1SUMS
|
sha1sum $file >> SHA1SUMS$EXT
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
1|2)
|
1|2)
|
||||||
|
@ -18,25 +22,25 @@ case $DOJIGDO in
|
||||||
do
|
do
|
||||||
iso=${file%%.jigdo}.iso
|
iso=${file%%.jigdo}.iso
|
||||||
|
|
||||||
grep -q $iso MD5SUMS
|
grep -q $iso MD5SUMS$EXT
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
MD5=`zcat -f $file | awk '/Image Hex MD5Sum/ {print $5}'`
|
MD5=`zcat -f $file | awk '/Image Hex MD5Sum/ {print $5}'`
|
||||||
if [ "$MD5"x != ""x ] ; then
|
if [ "$MD5"x != ""x ] ; then
|
||||||
echo "$MD5 $iso" >> MD5SUMS
|
echo "$MD5 $iso" >> MD5SUMS$EXT
|
||||||
else
|
else
|
||||||
echo "Jigdo file does not contain the Image MD5, calculating by hand"
|
echo "Jigdo file does not contain the Image MD5, calculating by hand"
|
||||||
md5sum $iso >> MD5SUMS
|
md5sum $iso >> MD5SUMS$EXT
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grep -q $iso SHA1SUMS
|
grep -q $iso SHA1SUMS$EXT
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
SHA1=`zcat -f $file | awk '/Image Hex SHA1Sum/ {print $5}'`
|
SHA1=`zcat -f $file | awk '/Image Hex SHA1Sum/ {print $5}'`
|
||||||
if [ "$SHA1"x != ""x ] ; then
|
if [ "$SHA1"x != ""x ] ; then
|
||||||
echo "$SHA1 $iso" >> SHA1SUMS
|
echo "$SHA1 $iso" >> SHA1SUMS$EXT
|
||||||
else
|
else
|
||||||
echo "Jigdo file does not contain the Image SHA1, calculating by hand"
|
echo "Jigdo file does not contain the Image SHA1, calculating by hand"
|
||||||
sha1sum $iso >> SHA1SUMS
|
sha1sum $iso >> SHA1SUMS$EXT
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue