Compare commits

...

3 commits

View file

@ -25,9 +25,9 @@
'clone-one'() { 'clone-one'() {
local url=$1 local url=$1
local package=${${url##*/}%.git} local package=${${url##*/}%.git}
# Simple package names are fetched from my GitHub repos. # Simple package names are fetched from the configured source prefix.
[[ $url != */* ]] && url=$GITHUB_USER/dot-$package [[ $url != */* ]] && url=$DOTS_SOURCE_PREFIX/$package
# user/repo packages are fetched from that user's repos. # user/repo packages are fetched from that user's GitHub repos.
[[ $url != *:* ]] && url=https://github.com/$url [[ $url != *:* ]] && url=https://github.com/$url
if [[ -d $DOTFILES/$package ]]; then if [[ -d $DOTFILES/$package ]]; then
echo "Looks like you already have $package cloned." >&2 echo "Looks like you already have $package cloned." >&2
@ -128,7 +128,8 @@
done done
} }
: ${DOTFILES:=~/dotfiles} ${STOW:=stow} ${GITHUB_USER:=00dani} 'main'() {
: ${DOTFILES:=~/dotfiles} ${STOW:=stow} ${DOTS_SOURCE_PREFIX:=https://git.00dani.me/dot}
comm=$1 comm=$1
if (( $# == 0 )); then if (( $# == 0 )); then
@ -147,3 +148,6 @@ case $comm in
pull) pull ${argv[2,-1]} ;; pull) pull ${argv[2,-1]} ;;
st|status) status ${argv[2,-1]} ;; st|status) status ${argv[2,-1]} ;;
esac esac
}
'main'