diff options
author | Neil Mayhew <neil_mayhew@sil.org> | 2014-05-08 11:26:35 +0200 |
---|---|---|
committer | Joerg Jaspert <joerg@debian.org> | 2014-05-08 11:26:35 +0200 |
commit | e365dabf452cc87f7166fea4fe1c8dcc903bccc3 (patch) | |
tree | 60eff6e91b56a74c564d1710d4059f83c2e3a266 | |
parent | 59514a00909dac717d4af21a41773916f0c3836d (diff) |
Use $0 for BASEDIR instead of $HOME
To: Joerg Jaspert <joerg@debian.org>
Cc: Neil Mayhew <neil_mayhew@sil.org>
Date: Fri, 22 Jun 2012 11:27:58 -0600 (1 year, 45 weeks, 4 days ago)
From: Neil Mayhew <neil_mayhew AT sil DOT org>
Ths provides more flexibility in where the scripts are placed, without
having to specify BASEDIR in the command
-rwxr-xr-x | bin/ftpsync | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ftpsync b/bin/ftpsync index 780245b..a8826bc 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -28,10 +28,10 @@ set -E # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # In case the admin somehow wants to have this script located someplace else, -# he can set BASEDIR, and we will take that. If it is unset we take ${HOME} +# he can set BASEDIR, and we will take that. If it is unset we use $0 # How the admin sets this isn't our place to deal with. One could use a wrapper # for that. Or pam_env. Or whatever fits in the local setup. :) -BASEDIR=${BASEDIR:-"${HOME}"} +BASEDIR=${BASEDIR:-"$(readlink -f $(dirname "$0")/..)"} # Script version. DO NOT CHANGE, *unless* you change the master copy maintained # by Joerg Jaspert and the Debian mirroradm group. |