Add helper for "never built on $ARCH" logs
[buildd-scripts.git] / bin / note_never_arch
1 #!/bin/sh
2
3 if [ "$ARCH"x = ""x ]; then
4     echo "ARCH not set, aborting"
5     exit 1
6 fi
7
8 for LOGFILE in $@; do
9     case $LOGFILE in
10         *.log)
11             # OK
12         ;;
13         *)
14             echo "ERROR: non-logfile $LOGFILE specified"
15             echo "ABORT"
16             exit 1
17             ;;
18     esac
19
20     if [ -f $LOGFILE ]; then
21         NOTEFILE=$(echo $LOGFILE | sed 's/\.log$/.note/')
22         echo "Never built on $ARCH anyway" > $NOTEFILE
23     else
24         echo "Can't find logfile $LOGFILE, ignoring"
25     fi
26 done
27