Skip to content

Instantly share code, notes, and snippets.

@tassaron
Created February 10, 2022 18:28
Show Gist options
  • Save tassaron/2cd2a0f35601bf035d7d4b139c17b79e to your computer and use it in GitHub Desktop.
Save tassaron/2cd2a0f35601bf035d7d4b139c17b79e to your computer and use it in GitHub Desktop.
script to make cloning my own repos faster
function gc () {
local returnval=n
function ynprompt () {
read -r -p "Clone ${1}? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
returnval=y
;;
esac
}
function dowork () {
local url=https://github.com/tassaron/"${1}"
ynprompt $url
if [ $returnval == y ]; then
git clone $url
fi
}
dowork $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment