Skip to content
Snippets Groups Projects
Commit 554b65a0 authored by Jochen Sprickerhof's avatar Jochen Sprickerhof Committed by Holger Levsen
Browse files

buildinfos.d.n: fix logic for old buildd files


Newer buildinfo files form the buildds are named -buildd.buildinfo and
preferred as fixed in c5bd2cdd. Before that they where renamed .0 or .1
if the file already existd. This makes sure those are preferred as well.

Signed-off-by: default avatarHolger Levsen <holger@layer-acht.org>
parent 5cffecd9
No related branches found
No related tags found
No related merge requests found
......@@ -76,10 +76,23 @@ do_day(){
echo "on no $MONTHPATH/$DAY/$FILE does not exist, exiting."
exit 1
elif [ -e $FULLTARGET ] ; then
OLD_TARGET="$(readlink -f $FULLTARGET)"
# prefer buildinfo file from the buildd
if [ "${FILE#*-buildd.buildinfo}" != "$FILE" ] ; then
mv $FULLTARGET $FULLTARGET.old
ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET
# skip non buildd file if the buildd file was linked already
elif [ "${OLD_TARGET#*-buildd.buildinfo}" != "$OLD_TARGET" ]; then
:
# old buildd files could be named .1 or .0, prefer them in that order.
elif [ "${FILE#*.buildinfo.1}" != "$FILE" ]; then
mv $FULLTARGET $FULLTARGET.1.old
ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET
elif [ "${OLD_TARGET#*.buildinfo.1}" != "$OLD_TARGET" ]; then
:
elif [ "${FILE#*.buildinfo.0}" != "$FILE" ] ; then
mv $FULLTARGET $FULLTARGET.0.old
ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET
elif [ ! -e "$FULLTARGET.0" ] ; then
ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET.0
echo "$MONTHPATH/$DAY/$FILE linked from $FULLTARGET.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment