buildd: add support for building squeeze based ISOs
[grml-live.git] / buildd / link_latest.sh
1 #!/bin/sh
2 # Filename:      /usr/share/grml-live/buildd/link_latest.sh
3 # Purpose:       create symlinks to the most recent snapshot ISOs
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -e
10
11 . /etc/grml/grml-buildd.conf
12
13 [ -n "$MIRROR_DIRECTORY" ] || exit 1
14 cd $MIRROR_DIRECTORY || exit 2
15
16 cd "$DAILY_DIR"
17 echo "---------------------------" >> "$DAILY_DIR"/.timestamp_link
18 for flavour in grml-medium_lenny   grml-medium_squeeze   grml-medium_sid   grml-small_lenny   grml-small_squeeze  grml-small_sid \
19                grml64-medium_lenny grml64-medium_squeeze grml64-medium_sid grml64-small_lenny grml64-small_squeeze grml64-small_sid \
20                grml64_lenny grml64_squeeze grml64_sid grml_lenny grml_squeeze grml_sid ; do
21   ISO="$(ls -1 $flavour/*.iso | tail -1)"
22   if [ -n "$ISO" ] ; then
23      ln -sf $ISO $(basename ${ISO%%_[0-9]*})_latest.iso
24      ln -sf ${ISO}.md5 $(basename ${ISO%%_[0-9]*})_latest.iso.md5
25      ln -sf ${ISO}.sha1 $(basename ${ISO%%_[0-9]*})_latest.iso.sha1
26   fi
27 done
28
29 ## END OF FILE #################################################################