30-makedist-autobuild-cleanold: don't do disasters with symlinks, check that images are files

This commit is contained in:
Silvan Calarco 2013-03-07 17:32:50 +01:00
parent ac3dde0195
commit 723d8e2d08

View File

@ -10,7 +10,7 @@ DESTBASEURL=/pub/openmamba/devel/media
[ "$TODAYDATE" ] || TODAYDATE=`date +%Y%m%d` [ "$TODAYDATE" ] || TODAYDATE=`date +%Y%m%d`
GLOBDOWNLOADSFILE=$DESTBASEDIR/downloads.inc GLOBDOWNLOADSFILE=$DESTBASEDIR/downloads.inc
LANGS="it en es" LANGS="it en es"
ARCHS="i586 arm" ARCHS="i586 arm x86_64"
tmpfile=`mktemp` tmpfile=`mktemp`
@ -22,7 +22,13 @@ for l in $LANGS; do
for d in `find $DESTBASEDIR/*/$l -maxdepth 0 -type d`; do for d in `find $DESTBASEDIR/*/$l -maxdepth 0 -type d`; do
for a in $ARCHS; do for a in $ARCHS; do
> $tmpfile > $tmpfile
for f in `find $d -maxdepth 1 -name "*.$a.iso" -o -name "*.$a.cpio.gz" -o -name "*.$a.tar.gz" -o -name "*.$a.tar.xz" -o -name "*.$a.tar.bz2"`; do # the following code was used to recover when unetbootin symlink was added causing all iso to be moved
#for f in `find $d -type l`; do
# rl=`readlink -f $f`
# r=`basename $rl`
# [ -e $d/old/$r ] && mv $d/old/$r* $d/
#done
for f in `find $d -maxdepth 1 -type f -a \( -name "*.$a.iso" -o -name "*.$a.cpio.gz" -o -name "*.$a.tar.gz" -o -name "*.$a.tar.xz" -o -name "*.$a.tar.bz2" \)`; do
echo `stat -c %Z $f` `basename $f` >> $tmpfile echo `stat -c %Z $f` `basename $f` >> $tmpfile
done done
filecount=0 filecount=0