Compare commits
No commits in common. "4288228da540b15e5f2412183e4ecd60d52cea83" and "3632e5cdcd920f03defcad383fe273a7f52724b9" have entirely different histories.
4288228da5
...
3632e5cdcd
1 changed files with 19 additions and 23 deletions
|
@ -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 the configured source prefix.
|
# Simple package names are fetched from my GitHub repos.
|
||||||
[[ $url != */* ]] && url=$DOTS_SOURCE_PREFIX/$package
|
[[ $url != */* ]] && url=$GITHUB_USER/dot-$package
|
||||||
# user/repo packages are fetched from that user's GitHub repos.
|
# user/repo packages are fetched from that user's 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,26 +128,22 @@
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
'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
|
||||||
if [[ -d $DOTFILES ]]; then
|
if [[ -d $DOTFILES ]]; then
|
||||||
comm=status
|
comm=status
|
||||||
else
|
else
|
||||||
comm=bootstrap
|
comm=bootstrap
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $comm in
|
case $comm in
|
||||||
bootstrap) bootstrap ;;
|
bootstrap) bootstrap ;;
|
||||||
clone) clone ${argv[2,-1]} ;;
|
clone) clone ${argv[2,-1]} ;;
|
||||||
fetch) fetch ${argv[2,-1]} ;;
|
fetch) fetch ${argv[2,-1]} ;;
|
||||||
link) link ${argv[2,-1]} ;;
|
link) link ${argv[2,-1]} ;;
|
||||||
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'
|
|
||||||
|
|
Loading…
Reference in a new issue