diff --git a/scripts/developer/git/setup-aliases b/scripts/developer/git/setup-aliases index 11b43d53f0060d90312a33fe8b75b3863742e925..5479ad0dd7ba0e6a620b8edb955bcc0feb1ea1a0 100755 --- a/scripts/developer/git/setup-aliases +++ b/scripts/developer/git/setup-aliases @@ -1,13 +1,13 @@ #!/usr/bin/env bash +echo "Setting up git aliases..." if ! which clang-format 2>1 1>/dev/null then echo "ADIOS development requires clang-format to be available in your path." exit 1 fi -echo "Adding 'git clang-format' alias" -if ! git config alias.clang-format "!bash scripts/git/git-clang-format" +if ! git config alias.clang-format "!scripts/developer/git/git-clang-format" then echo "Error adding clang-format alias" exit 2 diff --git a/scripts/developer/setup.sh b/scripts/developer/setup.sh old mode 100644 new mode 100755 index bd3bed7aec4c84b30efc81a16ee1bf12097f8c95..082cb1257d281c1b0da397b8c5728aa4bffa5129 --- a/scripts/developer/setup.sh +++ b/scripts/developer/setup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -test_cmd { +function test_cmd { if ! $1 ; then echo "Error: $2"; @@ -8,11 +8,11 @@ test_cmd { fi } -cd "${BASH_SOURCE%/*}" +cd "${BASH_SOURCE%/*}/../.." -test_cmd scripts/git/setup-alias \ +test_cmd scripts/developer/git/setup-aliases \ "Failed to setup git aliases" 2 -test_cmd scripts/git/setup-hooks \ +test_cmd scripts/developer/git/setup-hooks \ "Failed to setup git hooks" 1 git config hooks.clang-format true