Add a dots pull command which just git pulls in every package
This commit is contained in:
parent
71601dacf1
commit
cd3c23e76b
2 changed files with 14 additions and 1 deletions
|
@ -10,6 +10,7 @@ commands=(
|
|||
clone:'download dotfiles packages over Git'
|
||||
fetch:'retrieve updates to your packages'
|
||||
link:'install downloaded packages into your ~'
|
||||
pull:'fetch and apply package updates'
|
||||
status:'check whether your packages have changes'
|
||||
)
|
||||
if ! _retrieve_cache dots-repositories; then
|
||||
|
@ -29,6 +30,6 @@ case $state in
|
|||
else
|
||||
_message 'all known packages are already installed, you can still enter a git url manually'
|
||||
fi ;;
|
||||
fetch|link|st|status) _values -w package $DOTFILES/*(/:t) ;;
|
||||
fetch|link|pull|st|status) _values -w package $DOTFILES/*(/:t) ;;
|
||||
esac ;;
|
||||
esac
|
||||
|
|
|
@ -75,6 +75,17 @@
|
|||
done
|
||||
}
|
||||
|
||||
'pull'() {
|
||||
local -a packages
|
||||
packages=($argv)
|
||||
(( $#packages == 0 )) && packages=( $DOTFILES/*(N:t) )
|
||||
for p in $packages; do
|
||||
cd $DOTFILES/$p
|
||||
git pull
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
'status'() {
|
||||
local -a packages
|
||||
packages=($argv)
|
||||
|
@ -132,5 +143,6 @@ case $comm in
|
|||
clone) clone ${argv[2,-1]} ;;
|
||||
fetch) fetch ${argv[2,-1]} ;;
|
||||
link) link ${argv[2,-1]} ;;
|
||||
pull) pull ${argv[2,-1]} ;;
|
||||
st|status) status ${argv[2,-1]} ;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue