X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=scripts%2Fdebian%2Fbyhand-tag;h=d0674c84fec97ba70490a1d209fc432fa132077e;hb=27ea3ed3889d4eb82432d7b53424a0aa7f446017;hp=9c24fb66c1013480834730732df570764286b054;hpb=0d17ba4acfa0a60bbc0a0a952b4d535345cadd54;p=dak.git diff --git a/scripts/debian/byhand-tag b/scripts/debian/byhand-tag index 9c24fb66..d0674c84 100755 --- a/scripts/debian/byhand-tag +++ b/scripts/debian/byhand-tag @@ -10,13 +10,13 @@ export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars INPUT="${1:?"Usage: $0 filename"}" # Regular expression used to validate tag lines -CHECKRE='^[a-z0-9A-Z.+-]+[[:space:]]+Tag[[:space:]]+[a-z0-9:. ,{}+-]+$' +CHECKRE='^([a-z0-9A-Z.+-]+[[:space:]]+Tag)?[[:space:]]+[a-z0-9:. ,{}+-]+$' # This must end with / 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 @@ -33,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 @@ -44,8 +44,11 @@ mv "$OUTNONFREE" "$TARGET"tag.non-free chmod 644 "$TARGET"tag "$TARGET"tag.contrib "$TARGET"tag.non-free -(cd $TARGET && $scriptsdir/mk-extra-overrides.sh) -(cd "$TARGET" && cat tag tag.contrib tag.non-free | dak external-overrides import Tag) +(cd "$TARGET" \ + && dak external-overrides import unstable main Tag