fate-recv: require FATEDIR env var to be set
authorMans Rullgard <mans@mansr.com>
Mon, 26 Jul 2010 20:04:30 +0000 (21:04 +0100)
committerMans Rullgard <mans@mansr.com>
Mon, 26 Jul 2010 20:04:30 +0000 (21:04 +0100)
fate-recv.sh

index f113ed2..bb43391 100755 (executable)
@@ -7,7 +7,7 @@ die(){
     exit 1
 }
 
-fatedir=/tmp/fate-reports
+test -n "$FATEDIR" || die "FATEDIR not set"
 
 reptmp=$(mktemp -d)
 trap 'rm -r $reptmp' EXIT
@@ -21,7 +21,7 @@ slot=$(expr "$header" : 'fate:0:[0-9]*:\([^:]*\)')
 
 test -n "$date" && test -n "$slot" || die "Invalid report header"
 
-slotdir=$fatedir/$slot
+slotdir=$FATEDIR/$slot
 
 if [ -d "$slotdir" ]; then
     owner=$(cat "$slotdir/owner")