Skip to content

Commit

Permalink
Add support for sha1sum
Browse files Browse the repository at this point in the history
  • Loading branch information
mika committed Feb 20, 2009
1 parent 2def18e commit 3e18610
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
9 changes: 5 additions & 4 deletions buildd/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid
FILES=$(ls -1 $flavour/$flavour*.iso | tail -"$DAYS")
OLD_FILES=$(ls $flavour/$flavour*.iso | grep -v "$FILES")
for file in $OLD_FILES ; do
REMOVE_ME="$REMOVE_ME $(find $file -mtime +$DAYS)"
REMOVE_ME="$REMOVE_ME $(find "$file" -mtime +$DAYS)"
done
fi
done
Expand All @@ -35,9 +35,10 @@ done

for file in $REMOVE_ME ; do
# remove ISOs:
test -f ${file} && rm -f $file
# ... but keep their md5sum:
test -f ${file}.md5 && mv ${file}.md5 .archive
test -f "${file}" && rm -f "$file"
# ... but keep their md5sum / sha1sum:
test -f "${file}".md5 && mv "${file}".md5 .archive
test -f "${file}".sha1 && mv "${file}".sha1 .archive
done

# inform on successful removal:
Expand Down
3 changes: 3 additions & 0 deletions buildd/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ store_iso() {
if [ -r "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.md5" ] ; then
mv "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.md5" "${ISO_DIR}"
fi
if [ -r "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.sha1" ] ; then
mv "${OUTPUT_DIR}/grml_isos/${ISO_NAME}.sha1" "${ISO_DIR}"
fi
fi
}

Expand Down
1 change: 1 addition & 0 deletions buildd/link_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid
if [ -n "$ISO" ] ; then
ln -sf $ISO $(basename ${ISO%%_[0-9]*})_latest.iso
ln -sf ${ISO}.md5 $(basename ${ISO%%_[0-9]*})_latest.iso.md5
ln -sf ${ISO}.sha1 $(basename ${ISO%%_[0-9]*})_latest.iso.sha1
fi
done

Expand Down
3 changes: 1 addition & 2 deletions buildd/remove_isos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
cd $ISO_DIR || exit 3

for file in *.iso ; do
rm -f "$file"
rm -f "${file}".md5
rm -f "$file" "${file}".md5 "${file}".sha1
done

## END OF FILE #################################################################
6 changes: 3 additions & 3 deletions buildd/upload_isos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ cd $ISO_DIR || exit 4

umask 002
for file in *.iso ; do
[ -f "${file}.md5" ] || md5sum "$file" > "${file}".md5
chmod 664 "$file"
chmod 664 "${file}".md5
[ -f "${file}.md5" ] || md5sum "$file" > "${file}".md5
[ -f "${file}.sha1" ] || sha1sum "$file" > "${file}".sha1
chmod 664 "${file}" "${file}".md5 "${file}".sha1
done

for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid grml_sid grml_lenny \
Expand Down
3 changes: 2 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ grml-live (0.9.9) unstable; urgency=low
This should avoid issues with something like
'apt-get -t experimental ...'
* Consequently drop 'Latest change' lines from all files.
* Support generation of sha1sum [Testing: issue622]

-- Michael Prokop <mika@grml.org> Fri, 20 Feb 2009 16:03:42 +0100
-- Michael Prokop <mika@grml.org> Fri, 20 Feb 2009 16:31:04 +0100

grml-live (0.9.8) unstable; urgency=low

Expand Down
13 changes: 9 additions & 4 deletions grml-live
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,17 @@ else
-b $BOOT_FILE \
-o "${ISO_OUTPUT}/${ISO_NAME}" . ; RC=$?

# generate md5sum of ISO if we are using class 'RELEASE':
# generate md5sum and sha1sum of ISO if we are using class 'RELEASE':
case $CLASSES in *RELEASE*)
[ "$RC" = 0 ] && \
( cd $ISO_OUTPUT && \
md5sum ${ISO_NAME} > ${ISO_NAME}.md5 && \
touch -r ${ISO_NAME} ${ISO_NAME}.md5 )
(
if cd $ISO_OUTPUT ; then
md5sum ${ISO_NAME} > ${ISO_NAME}.md5 && \
touch -r ${ISO_NAME} ${ISO_NAME}.md5
sha1sum ${ISO_NAME} > ${ISO_NAME}.sha1 && \
touch -r ${ISO_NAME} ${ISO_NAME}.sha1
fi
)
;;
esac

Expand Down

0 comments on commit 3e18610

Please sign in to comment.