diff options
author | Mark Longair <mhl@pobox.com> | 2012-11-22 17:18:24 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-04-15 14:48:58 +0100 |
commit | 91d4a624a9daee8586115de4bb0f55878967cedb (patch) | |
tree | 6f57bb6278537c782b1e2c1f09248c9ddc1bd0ce | |
parent | 06cb75f3dfce9863d208e9acb4a5a431dad2add2 (diff) |
Simplify script for changing to the right directory
-rwxr-xr-x | bin/gettext-extract | 16 | ||||
-rwxr-xr-x | bin/gettext-merge | 17 |
2 files changed, 2 insertions, 31 deletions
diff --git a/bin/gettext-extract b/bin/gettext-extract index e77cf9cb0..934bf1711 100755 --- a/bin/gettext-extract +++ b/bin/gettext-extract @@ -7,21 +7,7 @@ # Copyright (c) 2011 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ -if [ -e ../../locale ] -then - cd ../../ -else if [ -e ../locale ] -then - cd ../ -else if [ -e locale ] -then - cd . -else - echo "Please run with current directory fixmystreet/bin" - exit 1 -fi -fi -fi +cd "$(dirname $(readlink -f $BASH_SOURCE))/.." # File to write to, clear it to start with PO=locale/FixMyStreet.po diff --git a/bin/gettext-merge b/bin/gettext-merge index 84aa4fdb7..af63fcb59 100755 --- a/bin/gettext-merge +++ b/bin/gettext-merge @@ -6,22 +6,7 @@ # Copyright (c) 2011 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ -# Yuck -if [ -e ../../locale ] -then - cd ../../ -else if [ -e ../locale ] -then - cd ../ -else if [ -e locale ] -then - cd . -else - echo "Please run with current directory fixmystreet" - exit 1 -fi -fi -fi +cd "$(dirname $(readlink -f $BASH_SOURCE))/.." for X in locale/*.UTF-8 do |