diff options
author | Janek Bevendorff <janek@jbev.net> | 2017-02-01 03:03:30 +0300 |
---|---|---|
committer | Janek Bevendorff <janek@jbev.net> | 2017-02-01 03:03:30 +0300 |
commit | e31638d3dda560a2f08ba73e5669bf254d6c84ca (patch) | |
tree | fd3db3f90b88a0f435506a6c462061378013a2a5 /release-tool | |
parent | e12cd83b80689d78e64e3132f3b69cabcd255f0b (diff) |
Fix formatting and coding style
Diffstat (limited to 'release-tool')
-rwxr-xr-x | release-tool | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/release-tool b/release-tool index be6bbc7aa..7bc54cda0 100755 --- a/release-tool +++ b/release-tool @@ -245,19 +245,21 @@ checkTransifexCommandExists() { } # re-implement realpath for OS X (thanks mschrag) -# https://superuser.com/questions/205127/how-to-retrieve-the-absolute-path-of-an-arbitrary-file-from-the-os-x +# https://superuser.com/questions/205127/ if $(command -v realpath > /dev/null); then realpath() { pushd . > /dev/null if [ -d "$1" ]; then - cd "$1"; dirs -l +0 - else cd "`dirname \"$1\"`" - cur_dir=`dirs -l +0` + cd "$1" + dirs -l +0 + else + cd "$(dirname "$1")" + cur_dir=$(dirs -l +0) if [ "$cur_dir" == "/" ]; then - echo "$cur_dir`basename \"$1\"`" + echo "$cur_dir$(basename "$1")" else - echo "$cur_dir/`basename \"$1\"`" + echo "$cur_dir/$(basename "$1")" fi fi popd > /dev/null |