X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=buildd%2Fupload_isos.sh;h=a18d3e3722e27e4c6932752379b3f5977febe6be;hp=17b5f6737780ab4546a1408ea523959e33e03dde;hb=db5741b5b41210da401504a3493d9a284da32e9c;hpb=81fd4cff970f631c9e464d84d2c71972da5c8fa8 diff --git a/buildd/upload_isos.sh b/buildd/upload_isos.sh index 17b5f67..a18d3e3 100755 --- a/buildd/upload_isos.sh +++ b/buildd/upload_isos.sh @@ -1,19 +1,29 @@ #!/bin/sh -# Filename: upload_isos.sh -# Purpose: upload generated ISOs to daily.grml.org +# Filename: /usr/share/grml-live/buildd/upload_isos.sh +# Purpose: upload grml ISOs to a rsync server # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Mit Okt 10 09:46:08 CEST 2007 [mika] ################################################################################ -cd /grml-live/grml-isos || exit 1 +. /etc/grml/grml-buildd.conf || exit 1 +[ -n "$RSYNC_MIRROR" ] || exit 2 +[ -n "$ISO_DIR" ] || exit 3 +[ -n "$FLAVOURS" ] || exit 5 + +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 $FLAVOURS; do + if ls $flavour* 1>/dev/null 2>&1 ; then + rsync --times --partial -az --quiet $flavour* $RSYNC_MIRROR/$flavour/ + fi done -umask 002 -rsync --partial -az --quiet /grml-live/grml-isos/* grml-build@debian.netcologne.de:/home/ftp/www.grml.org/daily/ ## END OF FILE #################################################################