diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2008-01-12 22:13:03 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2008-01-12 22:13:03 +0000 |
commit | 36e8d05157d6c831e0d3919ae2ee9c342498eda8 (patch) | |
tree | d54dd2c6f2e9796362948ce535652b5bf536a237 /download-translations | |
parent | c67241ed5661b56da42c9f35f5be27ac738a5d00 (diff) | |
download | gstreamer-common-36e8d05157d6c831e0d3919ae2ee9c342498eda8.tar.gz |
download-translations: Remove bash-isms
Original commit message from CVS:
* download-translations:
Remove bash-isms
Diffstat (limited to 'download-translations')
-rwxr-xr-x | download-translations | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/download-translations b/download-translations index 7272378..b1081d6 100755 --- a/download-translations +++ b/download-translations @@ -16,13 +16,15 @@ DOMAINS=\ #DOMAINS="es fr hu sv pl xx" # check for 'diff' program -if ! diff --version 2>/dev/null >/dev/null; then +diff --version 2>/dev/null >/dev/null +if [ ! $? ]; then echo "==== You must have the 'diff' program installed for this script ====" exit 1 fi # check for 'wget' program -if ! wget --version 2>/dev/null >/dev/null; then +wget --version 2>/dev/null >/dev/null +if [ ! $? ]; then echo "==== You must have the 'wget' program installed for this script ====" exit 1 fi @@ -61,10 +63,7 @@ do PACKAGE_PO_URL_BASE="http://translationproject.org/latest/$PACKAGE" PO_URL="$PACKAGE_PO_URL_BASE/$d.po" PO_FILENAME="$PACKAGE.$d.po" - if ! wget -q -nc -O $PO_FILENAME $PO_URL 2>/dev/null >/dev/null; then - rm -f $PO_FILENAME - echo "$d.po: failure (does probably not exist)" - else + if wget -q -nc -O $PO_FILENAME $PO_URL; then if [ -f "po/$d.po" ]; then # ./po/foo.po exists, so let's check if ours matches the latest from the # translation project website @@ -77,13 +76,16 @@ do DOMAINS_UPDATED="$DOMAINS_UPDATED $d" fi else - # ./po/foo.po does exists, but foo.po exists on the translation project + # ./po/foo.po doesn't exist, but foo.po exists on the translation project # website, so it's probably a new translation echo "$d.po: new language" - mv $PO_FILENAME "po/$d.po" + # mv $PO_FILENAME "po/$d.po" DOMAINS_UPDATED="$DOMAINS_UPDATED $d" DOMAINS_TO_ADD="$DOMAINS_TO_ADD $d" fi + else + rm -f $PO_FILENAME + echo "$d.po: failure (does probably not exist)" fi done |