Made a new update function
This commit is contained in:
parent
98892460d4
commit
dee1c7161d
1 changed files with 51 additions and 29 deletions
|
@ -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() {
|
||||||
|
base --devel
|
||||||
|
plugins
|
||||||
|
{%@@ if profile == "Moria" @@%}
|
||||||
|
docker
|
||||||
|
{%@@ else @@%}
|
||||||
|
yay -Syu firefox-nightly
|
||||||
|
{%@@ endif @@%}
|
||||||
|
sudo awman-update
|
||||||
|
}
|
||||||
|
|
||||||
|
base() {
|
||||||
|
yay -Pw
|
||||||
|
yay $@
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins() {
|
||||||
vim +PlugUpgrade +PlugUpdate +CocUpdate +qa
|
vim +PlugUpgrade +PlugUpdate +CocUpdate +qa
|
||||||
zinit self-update
|
zinit self-update
|
||||||
zinit update -p
|
zinit update -p
|
||||||
$HOME/.tmux/plugins/tpm/bin/update_plugins all
|
$HOME/.tmux/plugins/tpm/bin/update_plugins all
|
||||||
}
|
}
|
||||||
|
|
||||||
update() { yay -Pw && yay }
|
docker() {
|
||||||
|
|
||||||
{%@@ if profile == "Moria" @@%}
|
|
||||||
update-docker() {
|
|
||||||
for dir in $HOME/Git/dotfiles/docker/*; do
|
for dir in $HOME/Git/dotfiles/docker/*; do
|
||||||
cd $dir
|
cd $dir
|
||||||
docker-compose pull
|
docker-compose pull
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
update-all() {
|
if [ $# -eq 0 ]; then
|
||||||
update
|
1=base
|
||||||
plugupdate
|
fi
|
||||||
update-docker
|
|
||||||
|
case "$1" in
|
||||||
|
all)
|
||||||
|
all
|
||||||
|
;;
|
||||||
|
base)
|
||||||
|
base
|
||||||
|
;;
|
||||||
|
plugins)
|
||||||
|
plugins
|
||||||
|
;;
|
||||||
|
docker)
|
||||||
|
docker
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
printf "$1: not a valid action"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
{%@@ else @@%}
|
|
||||||
updateall() {
|
|
||||||
yay -Pw
|
|
||||||
yay -Syu --devel firefox-nightly
|
|
||||||
plugupdate
|
|
||||||
sudo awman-update
|
|
||||||
}
|
|
||||||
{%@@ endif @@%}
|
|
||||||
|
|
||||||
# remove unneeded packages
|
# remove unneeded packages
|
||||||
autoremove() { sudo pacman -Rns $(pacman -Qdtq) }
|
autoremove() { sudo pacman -Rns $(pacman -Qdtq) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue