[Collab-qa-commits] r2133 - udd/scripts
Andreas Tille
tille at alioth.debian.org
Thu Feb 2 21:45:24 UTC 2012
Author: tille
Date: 2012-02-02 21:45:24 +0000 (Thu, 02 Feb 2012)
New Revision: 2133
Modified:
udd/scripts/fetch_ddtp_translations.sh
Log:
Enable bz2 compressed translations
Modified: udd/scripts/fetch_ddtp_translations.sh
===================================================================
--- udd/scripts/fetch_ddtp_translations.sh 2012-02-02 21:44:07 UTC (rev 2132)
+++ udd/scripts/fetch_ddtp_translations.sh 2012-02-02 21:45:24 UTC (rev 2133)
@@ -2,6 +2,8 @@
set -e
+ZIPEXT=bz2
+
TARGETPATH=$1
MIRROR=$2
shift
@@ -13,12 +15,12 @@
for rel in $RELEASES; do
TARGETDIR="$TARGETPATH"/${rel}
find "$TARGETPATH"/${rel} -name '*.md5' -exec mv '{}' '{}'.prev \;
- rm -rf "$TARGETDIR"/*.gz
+ rm -rf "$TARGETDIR"/*.${ZIPEXT}
[ -d $TARGETDIR ] || mkdir -p $TARGETDIR
# store a copy of md5 sums of previous files
- `dirname $0`/getlinks.pl "$HTTPMIRROR"/dists/${rel}/main/i18n/ "$TARGETPATH"/${rel} 'Translation-.*\.gz$'
+ `dirname $0`/getlinks.pl "$HTTPMIRROR"/dists/${rel}/main/i18n/ "$TARGETPATH"/${rel} "Translation-.*\.${ZIPEXT}$"
# create md5 sums of translation files to enable deciding whether processing is needed or not
- for zipfile in `find "$TARGETPATH"/${rel} -name '*.gz'` ; do md5sum $zipfile > "$TARGETPATH"/${rel}/`basename $zipfile .gz`.md5 ; done
+ for zipfile in `find "$TARGETPATH"/${rel} -name "*.${ZIPEXT}"` ; do md5sum $zipfile > "$TARGETPATH"/${rel}/`basename $zipfile .${ZIPEXT}`.md5 ; done
# getlinks.pl always returns 0 independently from success so we have to verify that the target dir is
# not empty.
NUMFILES=`ls "$TARGETPATH"/${rel} | wc -l`
@@ -30,7 +32,7 @@
## This might happen later but it requires deeper changes in several tools
## including apt - so we have to download via http from ddtp directly which
## does not support rsync
- # rsync -a --no-motd --include "Translation-*.gz" --exclude "*" "$RSYNCMIRROR"/dists/${rel}/main/i18n/ $TARGETDIR
+ # rsync -a --no-motd --include "Translation-*.${ZIPEXT}" --exclude "*" "$RSYNCMIRROR"/dists/${rel}/main/i18n/ $TARGETDIR
done
exit 0
More information about the Collab-qa-commits
mailing list