aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2012-11-22 17:18:24 +0000
committerMark Longair <mhl@pobox.com>2013-04-15 14:48:58 +0100
commit91d4a624a9daee8586115de4bb0f55878967cedb (patch)
tree6f57bb6278537c782b1e2c1f09248c9ddc1bd0ce /bin
parent06cb75f3dfce9863d208e9acb4a5a431dad2add2 (diff)
Simplify script for changing to the right directory
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gettext-extract16
-rwxr-xr-xbin/gettext-merge17
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