From 4f52f22735f3bb9aeb3d60fb3e3ac3e3783e458e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 May 2014 12:06:09 +0200 Subject: [PATCH] Fix: Run script from correct dir --- dev/translation/txpull.sh | 8 +++++++- dev/translation/txpush.sh | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dev/translation/txpull.sh b/dev/translation/txpull.sh index 5b6ac02bdd9..6365aa23637 100755 --- a/dev/translation/txpull.sh +++ b/dev/translation/txpull.sh @@ -13,7 +13,13 @@ then echo "This pull remote transifex files to local dir." echo "Note: If you pull a language file (not source), file will be skipped if local file is newer." echo " Using -f will overwrite local file (does not work with 'all')." - echo "Usage: txpull.sh (all|xx_XX) [-r dolibarr.file] [-f]" + echo "Usage: ./dev/translation/txpull.sh (all|xx_XX) [-r dolibarr.file] [-f]" + exit +fi + +if [ ! -d ".tx" ] +then + echo "Script must be ran from root directory of project with command ./dev/translation/txpull.sh" exit fi diff --git a/dev/translation/txpush.sh b/dev/translation/txpush.sh index c6fedb2640c..2acc96b1d6f 100755 --- a/dev/translation/txpush.sh +++ b/dev/translation/txpush.sh @@ -13,10 +13,15 @@ then echo "This push local files to transifex." echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer." echo " Using -f will overwrite translation but not memory." - echo "Usage: txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]" + echo "Usage: ./dev/translation/txpush.sh (source|all|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]" exit fi +if [ ! -d ".tx" ] +then + echo "Script must be ran from root directory of project with command ./dev/translation/txpush.sh" + exit +fi if [ "x$1" = "xall" ] then