diff --git a/.local/bin/git-get b/.local/bin/git-get index c9d356d..ab95a89 100755 --- a/.local/bin/git-get +++ b/.local/bin/git-get @@ -1,6 +1,6 @@ #!/bin/sh -DOMAIN=bitbucket.org +DOMAIN=github.com USER=ambrevar usage () { @@ -11,18 +11,14 @@ Clone git repo(s) from $DOMAIN:$USER. Options: - -h: Show this help. -d DOMAIN: Set domain. -u USER: Set repository owner. EOF } -while getopts ":hd:u:" opt; do +while getopts ":d:u:" opt; do case $opt in - h) - usage - exit 1 ;; d) DOMAIN=$OPTARG ;; u) @@ -46,5 +42,5 @@ if ! command -v git >/dev/null 2>&1; then fi for i; do - git clone "git@$DOMAIN:/$USER/$i" + git clone "git@$DOMAIN:/$USER/$i" || git clone "https://$DOMAIN/$USER/$i" done