4 if [ -z "$MIRROR_DIRECTORY" ] ; then
5 echo "Usage: jenkins-link_latest.sh path_to_public_directory flavour1 ... flavourN" >&2
12 JOBS=/var/lib/jenkins/jobs
14 cd $MIRROR_DIRECTORY || exit 1
15 for f in $FLAVOURS; do
16 [ -d $JOBS/$f/builds ] || continue
17 [ -d ./$f ] && rm -r ./$f
19 for buildpath in $JOBS/$f/builds/*_*; do
20 build=$(basename $buildpath)
22 for isofile in $buildpath/archive/grml_isos/*; do
23 [ -e $isofile ] && ln -s $isofile $f/$build/
25 [ -d $buildpath/archive/grml_logs ] && ln -s $buildpath/archive/grml_logs $f/$build/logs
27 latest=$(basename $(readlink $JOBS/$f/lastSuccessful))
29 if [ -e $f/$latest/*.iso ]; then
30 latestname=$(basename ${f}/$latest/*.iso)
31 ln -s ../$latest/${latestname} ${f}/latest/${f}_latest.iso
32 ln -s ../$latest/${latestname}.md5 ${f}/latest/${f}_latest.iso.md5
33 ln -s ../$latest/${latestname}.sha1 ${f}/latest/${f}_latest.iso.sha1