summaryrefslogtreecommitdiff
path: root/shell-scripts
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-04-29 12:09:08 +0200
committerMike Vink <mike1994vink@gmail.com>2023-04-29 12:09:08 +0200
commitd0d9ebb6f77b6fdc39dfd617746c00b06471b12a (patch)
tree58eb93a97eaeddc8f11c7a6c22d39118b220120f /shell-scripts
parented0ef3875d955462b66684862e158dda63f12aa6 (diff)
fixup
Diffstat (limited to 'shell-scripts')
-rw-r--r--shell-scripts/checkout10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell-scripts/checkout b/shell-scripts/checkout
index a1cc9ce..85c8b3f 100644
--- a/shell-scripts/checkout
+++ b/shell-scripts/checkout
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@/bin/bash
error () {
echo "$1"
exit 1
@@ -7,7 +7,7 @@ error () {
eval "$(pass show personal/shell-scripts/secrets)"
DEST_DIR=""
case "${@}" in
- "az "*)
+ az|"az "*)
shift
LIST_PROJECTS="/_apis/projects?api-version=7.1-preview.4"
AUTH_HEADER="Authorization: Basic $WORK_AZDO_GIT_AUTH"
@@ -38,7 +38,7 @@ case "${@}" in
git clone --bare $WORK_AZDO_GIT_ORG_URL/$PROJECT $DEST_DIR
fi
;;
- "gh "*)
+ gh|"gh "*)
shift
repo=$(gh repo list --json owner,name -q '.[] | "\(.owner.login)/\(.name)"' | fzf --print-query -1)
GIT_DIR="$HOME/projects"
@@ -62,8 +62,8 @@ case "${@}" in
;;
esac
-if [[ $DEST_DIR -ne "" ]]; then
+if ! [[ -z "$DEST_DIR" ]]; then
cd $DEST_DIR
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- $EDITOR
+ $EDITOR "$DEST_DIR"
fi