diff options
Diffstat (limited to 'files')
-rwxr-xr-x | files/turris_checkout_repo_branch.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/files/turris_checkout_repo_branch.sh b/files/turris_checkout_repo_branch.sh index 486c0b1..ae88656 100755 --- a/files/turris_checkout_repo_branch.sh +++ b/files/turris_checkout_repo_branch.sh @@ -1,9 +1,6 @@ #!/bin/bash set -o errexit -o nounset -helpers_dir="$(dirname "$(readlink -f "$0")")" -. "$helpers_dir/common.sh" - print_usage() { cat >&2 <<-EOF Usage: ${0##*/} [-h] BRANCH [BOARD] @@ -78,8 +75,10 @@ done } [ -z "$board" ] && board="omnia" -[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" != "true" ] && \ - die "Current working directory is not in git repository" +[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" != "true" ] && { + echo "Current working directory is not in git repository" + exit 1 +} toplevel="$(git rev-parse --show-toplevel)" |