summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-04-21 14:58:58 +0200
committerKarel Kočí <cynerd@email.cz>2020-04-21 14:58:58 +0200
commit19571875f1c6dc3742f643f4097e11b51dc9338e (patch)
treed88fe42613fc260c912cbc029693e539615b22c5
parentb1acd8c1fd4a4f43c01bff83fd6cfb5889693102 (diff)
downloadlaminar-cnf-19571875f1c6dc3742f643f4097e11b51dc9338e.tar.gz
laminar-cnf-19571875f1c6dc3742f643f4097e11b51dc9338e.tar.bz2
laminar-cnf-19571875f1c6dc3742f643f4097e11b51dc9338e.zip
files/turris_checkout_repo_branch.sh: remove dependency on common.sh
-rwxr-xr-xfiles/turris_checkout_repo_branch.sh9
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)"