summaryrefslogtreecommitdiff
path: root/shell-scripts/gh-switch-project
diff options
context:
space:
mode:
Diffstat (limited to 'shell-scripts/gh-switch-project')
-rw-r--r--shell-scripts/gh-switch-project21
1 files changed, 0 insertions, 21 deletions
diff --git a/shell-scripts/gh-switch-project b/shell-scripts/gh-switch-project
deleted file mode 100644
index 9f460d9..0000000
--- a/shell-scripts/gh-switch-project
+++ /dev/null
@@ -1,21 +0,0 @@
-#!@bash@/bin/bash
-eval "$(pass show personal/shell-scripts/secrets)"
-repo=$(gh repo list --json owner,name -q '.[] | "\(.owner.login)/\(.name)"' | fzf --print-query -1)
-GIT_DIR="$HOME/projects"
-if [ ! -d $GIT_DIR ]; then
- mkdir -p $GIT_DIR
-fi
-
-if [[ "$(echo "$repo" | wc -l)" -ne 1 ]]; then
- echo "Fetching my repo"
- repo="$(echo "$repo" | tail -n1)"
-fi
-
-DEST_DIR="$GIT_DIR/$(echo $repo | cut -d '/' -f2)"
-if [ ! -d $DEST_DIR ]
-then
- gh repo clone $repo $DEST_DIR -- --bare
-fi
-cd $DEST_DIR
-git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
-$EDITOR