pld-ftp-admin: shell/bashrc - let cp-kde-i18n choose source arch
glen
glen at pld-linux.org
Thu Aug 28 16:41:49 CEST 2008
Author: glen Date: Thu Aug 28 14:41:49 2008 GMT
Module: pld-ftp-admin Tag: HEAD
---- Log message:
- let cp-kde-i18n choose source arch
---- Files affected:
pld-ftp-admin/shell:
bashrc (1.11 -> 1.12)
---- Diffs:
================================================================
Index: pld-ftp-admin/shell/bashrc
diff -u pld-ftp-admin/shell/bashrc:1.11 pld-ftp-admin/shell/bashrc:1.12
--- pld-ftp-admin/shell/bashrc:1.11 Thu Aug 28 16:33:56 2008
+++ pld-ftp-admin/shell/bashrc Thu Aug 28 16:41:44 2008
@@ -41,14 +41,22 @@
fi
cp-kde-i18n() {
- sarch=amd64
- info=$1
- if [ ! -f $info ]; then
- echo >&2 "cp-kde-i18n: Specify existing info file"
+ local sarch=$1
+ local info=$2
+
+ if [ -z "$sarch" -o ! -f "$info" ]; then
+ echo >&2 "Usage: cp-kde-i18n [SOURCE ARCH] [INFO FILE]"
+ return
+ fi
+ if [ $(grep -c "^file:$sarch:" "$info") = 0 ]; then
+ echo >&2 "cp-kde-i18n: $sarch doesn't look like arch that has packages built"
return
fi
- for arch in alpha athlon i386 i586 i686 ppc sparc; do
+ for arch in amd64 alpha athlon i386 i586 i686 ppc sparc; do
+ if [ "$arch" = "$sarch" ]; then
+ continue
+ fi
awk -F: -vsarch=$sarch '/^file:/ && $2 == sarch {print $3}' $info | xargs -ri cp -al ../../$sarch/RPMS/{} ../../$arch/RPMS
awk -F: -vsarch=$sarch -varch=$arch '/^file:/ && $2 == sarch {printf("%s:%s:%s\n", $1, arch, $3)}' $info >> $info
done
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/shell/bashrc?r1=1.11&r2=1.12&f=u
More information about the pld-cvs-commit
mailing list