8 echo "Usage: $0 filename version arch changes_file suite"
12 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
15 INPUT="$1" # Tarball to read, compressed with gzip
18 CHANGES="$4" # Changes file for the upload
28 : # OK for automated byband processing
31 error "Reject: task overrides can only be processed automatically for uploads to unstable"
36 # Regular expression used to validate tag lines
37 CHECKRE='^[a-z0-9A-Z.+-]+[[:space:]]+Task[[:space:]]+[a-z0-9:. ,{}+-]+$'
39 # This must end with /
40 TARGET=/srv/ftp-master.debian.org/scripts/external-overrides/
42 # Read the main directory from the tarball
43 DIR="`tar ztf \"$INPUT\" | tac | tail -n 1`"
45 # Create temporary files where to store the validated data
47 OUTMAIN="`mktemp \"$TARGET\"task.new.XXXXXX`"
49 # If we fail somewhere, cleanup the temporary files
55 # Extract the data into the temporary files
56 tar -O -zxf "$INPUT" "$DIR"task | grep -E "$CHECKRE" > "$OUTMAIN"
58 # Move the data to the final location
59 mv "$OUTMAIN" "$TARGET"task
61 chmod 644 "$TARGET"task
63 dak external-overrides import unstable main Task <"$TARGET"task
64 dak external-overrides copy unstable testing