- update .changes file and skip non-existant changes
OBS-URL: https://build.opensuse.org/package/show/system:install:head/package-translations?expand=0&rev=19
This commit is contained in:
parent
1e0987d473
commit
bce656b287
@ -7,19 +7,46 @@ if test -d "$MY_LCN_PACK_CHECKOUT"; then
|
|||||||
svn up $MY_LCN_PACK_CHECKOUT
|
svn up $MY_LCN_PACK_CHECKOUT
|
||||||
else
|
else
|
||||||
echo "No \$MY_LCN_PACK_CHECKOUT set, will checkout temporarly"
|
echo "No \$MY_LCN_PACK_CHECKOUT set, will checkout temporarly"
|
||||||
svn export https://forgesvn1.novell.com/svn/suse-i18n/trunk/packages
|
svn export https://svn.berlios.de/svnroot/repos/opensuse-i18n/trunk/packages
|
||||||
export MY_LCN_PACK_CHECKOUT=$PWD/packages
|
export MY_LCN_PACK_CHECKOUT=$PWD/packages
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf mo
|
rm -rf mo
|
||||||
|
tar xf package-translations.tar.bz2
|
||||||
|
mv mo mo.old
|
||||||
mkdir mo
|
mkdir mo
|
||||||
for file in $MY_LCN_PACK_CHECKOUT/*/po; do
|
for file in $MY_LCN_PACK_CHECKOUT/*/po; do
|
||||||
lang=`echo $file | sed -e "s,/po,,; s,.*/,,"`
|
lang=`echo $file | sed -e "s,/po,,; s,.*/,,"`
|
||||||
echo $file $lang
|
echo $file $lang
|
||||||
msgcat --use-first $file/*.po | msgfmt -o mo/package-translations-$lang.mo -
|
msgcat --use-first $file/*.po | msgfmt -o mo/package-translations-$lang.mo -
|
||||||
done
|
done
|
||||||
rm -f package-translations.tar.bz2
|
if diff -ru mo.old mo; then
|
||||||
tar cfj package-translations.tar.bz2 mo
|
echo "no changes"
|
||||||
rm -rf mo
|
rm -rf mo mo.old
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
rm -f package-translations.tar.bz2
|
||||||
|
tar cfj package-translations.tar.bz2 mo
|
||||||
|
rm -rf mo mo.old
|
||||||
|
fi
|
||||||
|
|
||||||
|
NAME=package-translations
|
||||||
|
{
|
||||||
|
echo "-------------------------------------------------------------------"
|
||||||
|
timestamp=$(LC_ALL=POSIX TZ=Europe/Berlin date)
|
||||||
|
timestamp2=$(LC_ALL=POSIX TZ=Europe/Berlin date +"%Y-%m-%d")
|
||||||
|
user=$(osc whois | cut -d\" -f3)
|
||||||
|
user=$(echo $user)
|
||||||
|
echo "$timestamp - $user"
|
||||||
|
echo
|
||||||
|
echo "- automated update on $timestamp2"
|
||||||
|
echo
|
||||||
|
if head -n 6 $NAME.changes | grep -q "automated update" ; then
|
||||||
|
tail -n +6 $NAME.changes
|
||||||
|
else
|
||||||
|
cat $NAME.changes
|
||||||
|
fi
|
||||||
|
} > $NAME.changes.new
|
||||||
|
mv $NAME.changes.new $NAME.changes
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 11 10:48:20 UTC 2011 - coolo@suse.com
|
Tue Oct 11 11:41:44 UTC 2011 - coolo@suse.com
|
||||||
|
|
||||||
- update translations
|
- update .changes file and skip non-existant changes
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 31 08:06:32 UTC 2011 - coolo@suse.com
|
Wed Aug 31 08:06:32 UTC 2011 - coolo@suse.com
|
||||||
|
Loading…
Reference in New Issue
Block a user