Make the 'bare' dots package prefix configurable, defaulting to my Gitea dot org

This commit is contained in:
Danielle McLean 2020-06-18 13:37:53 +10:00
parent d01591a0d4
commit 4288228da5
Signed by: 00dani
GPG key ID: 9DDE1EDE01E3A605

View file

@ -25,8 +25,8 @@
'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 Gitea dot repos. # Simple package names are fetched from the configured source prefix.
[[ $url != */* ]] && url=https://git.00dani.me/dot/$package [[ $url != */* ]] && url=$DOTS_SOURCE_PREFIX/$package
# user/repo packages are fetched from that user's GitHub 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
@ -129,7 +129,7 @@
} }
'main'() { 'main'() {
: ${DOTFILES:=~/dotfiles} ${STOW:=stow} ${GITHUB_USER:=00dani} : ${DOTFILES:=~/dotfiles} ${STOW:=stow} ${DOTS_SOURCE_PREFIX:=https://git.00dani.me/dot}
comm=$1 comm=$1
if (( $# == 0 )); then if (( $# == 0 )); then