X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fbyhand-tag;h=b169757c2a87330e6de2e576d0df9c2624232997;hb=77c62d8ce099969468b370ef90806127f31cd925;hp=e9cb43acc6b07c9031d94193612fc5f8c974fb04;hpb=164bd4615cb96a8b8d5bac8d67c0b5c57a7f64e2;p=dak.git diff --git a/scripts/debian/byhand-tag b/scripts/debian/byhand-tag index e9cb43ac..b169757c 100755 --- a/scripts/debian/byhand-tag +++ b/scripts/debian/byhand-tag @@ -1,4 +1,10 @@ -#!/bin/sh -ue +#!/bin/sh + +set -u +set -e + +export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars +. $SCRIPTVARS # Tarball to read, compressed with gzip INPUT="${1:?"Usage: $0 filename"}" @@ -7,10 +13,10 @@ INPUT="${1:?"Usage: $0 filename"}" CHECKRE='^[a-z0-9A-Z.+-]+[[:space:]]+Tag[[:space:]]+[a-z0-9:. ,{}+-]+$' # This must end with / -TARGET=/srv/ftp.debian.org/scripts/external-overrides/ +TARGET=/srv/ftp-master.debian.org/scripts/external-overrides/ # Read the main directory from the tarball -DIR="`tar ztf \"$INPUT\" | tac | tail -n 1`" +DIR="`tar ztf \"$INPUT\" | tail -n 1 | cut -d/ -f1`" # Create temporary files where to store the validated data umask 002 @@ -27,9 +33,9 @@ cleanup() { trap cleanup EXIT # Extract the data into the temporary files -tar -O -zxf "$INPUT" "$DIR"tag | grep -E "$CHECKRE" > "$OUTMAIN" -tar -O -zxf "$INPUT" "$DIR"tag.contrib | grep -E "$CHECKRE" > "$OUTCONTRIB" -tar -O -zxf "$INPUT" "$DIR"tag.non-free | grep -E "$CHECKRE" > "$OUTNONFREE" +tar -O -zxf "$INPUT" "$DIR"/tag | grep -E "$CHECKRE" > "$OUTMAIN" +tar -O -zxf "$INPUT" "$DIR"/tag.contrib | grep -E "$CHECKRE" > "$OUTCONTRIB" +tar -O -zxf "$INPUT" "$DIR"/tag.non-free | grep -E "$CHECKRE" > "$OUTNONFREE" # Move the data to the final location mv "$OUTMAIN" "$TARGET"tag @@ -38,7 +44,11 @@ mv "$OUTNONFREE" "$TARGET"tag.non-free chmod 644 "$TARGET"tag "$TARGET"tag.contrib "$TARGET"tag.non-free -(cd $TARGET && ./mk-extra-overrides.sh) +(cd "$TARGET" \ + && dak external-overrides import unstable main Tag