From d0d9ebb6f77b6fdc39dfd617746c00b06471b12a Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sat, 29 Apr 2023 12:09:08 +0200 Subject: fixup --- shell-scripts/checkout | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'shell-scripts') 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 -- cgit v1.2.3