diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-11-27 20:17:48 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-11-27 20:17:48 +0100 |
commit | 45509c356099e11338f24a1b3f98b2c0d24a9be6 (patch) | |
tree | 7437b152594e8d5a580d2cbee515717d95cc09f2 | |
parent | fb8f0590b0bb143ef1b9e4ba936b0d693b23e75c (diff) | |
download | weechat-45509c356099e11338f24a1b3f98b2c0d24a9be6.zip |
core: double quote variables in script autogen.sh
-rwxr-xr-x | autogen.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh index 8fe0fc848..338bc103a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -24,8 +24,8 @@ ### common stuff ### -DIR=$(cd $(dirname "$0"); pwd) -cd $DIR +DIR=$(cd "$(dirname "$0")" || exit 1; pwd) +cd "$DIR" || exit 1 AUTOGEN_LOG=autogen.log @@ -41,9 +41,8 @@ err () run () { - echo -n "Running \"$@\"..." - eval $@ >$AUTOGEN_LOG 2>&1 - if [ $? = 0 ] ; then + printf "Running \"%s\"..." "$@" + if eval "$@" >$AUTOGEN_LOG 2>&1 ; then echo " OK" else echo " FAILED" |