Made a new update function

main
Marko Korhonen 5 years ago
parent 98892460d4
commit dee1c7161d

@ -115,39 +115,61 @@ dotsync() { cd $DOTREPO && gpull && ga && gc && gpush && cd $OLDPWD }
# sync password manager # sync password manager
passync() { pass git pull && pass git push && updatesecrets } passync() { pass git pull && pass git push && updatesecrets }
# update stuff update() {
plugupdate() { all() {
vim +PlugUpgrade +PlugUpdate +CocUpdate +qa base --devel
zinit self-update plugins
zinit update -p {%@@ if profile == "Moria" @@%}
$HOME/.tmux/plugins/tpm/bin/update_plugins all docker
} {%@@ else @@%}
yay -Syu firefox-nightly
update() { yay -Pw && yay } {%@@ endif @@%}
sudo awman-update
{%@@ if profile == "Moria" @@%} }
update-docker() {
for dir in $HOME/Git/dotfiles/docker/*; do base() {
cd $dir yay -Pw
docker-compose pull yay $@
docker-compose up -d }
cd ..
done plugins() {
} vim +PlugUpgrade +PlugUpdate +CocUpdate +qa
zinit self-update
zinit update -p
$HOME/.tmux/plugins/tpm/bin/update_plugins all
}
docker() {
for dir in $HOME/Git/dotfiles/docker/*; do
cd $dir
docker-compose pull
docker-compose up -d
cd ..
done
}
if [ $# -eq 0 ]; then
1=base
fi
update-all() { case "$1" in
update all)
plugupdate all
update-docker ;;
} base)
{%@@ else @@%} base
updateall() { ;;
yay -Pw plugins)
yay -Syu --devel firefox-nightly plugins
plugupdate ;;
sudo awman-update docker)
docker
;;
*)
printf "$1: not a valid action"
;;
esac
} }
{%@@ endif @@%}
# remove unneeded packages # remove unneeded packages
autoremove() { sudo pacman -Rns $(pacman -Qdtq) } autoremove() { sudo pacman -Rns $(pacman -Qdtq) }

Loading…
Cancel
Save