mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-11-08 13:30:47 -05:00
Add update script
This commit is contained in:
parent
6d13726aba
commit
01d90c0f40
1 changed files with 30 additions and 0 deletions
30
dot_local/bin/executable_update-all
Normal file
30
dot_local/bin/executable_update-all
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
alias paru='paru --skipreview'
|
||||
alias zigup='zigup --install-dir "${HOME}/.local/share/zigup" --path-link "${HOME}/.local/bin/zig"'
|
||||
|
||||
updates=$(checkupdates)
|
||||
aur_updates=$(paru -Qua)
|
||||
|
||||
if [ "$updates" = "" ] && [ "$aur_updates" = "" ]; then
|
||||
echo "System is already up to date."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
river_has_update=$(echo "$aur_updates" | grep -c 'river-git')
|
||||
zls_has_update=$(echo "$aur_updates" | grep -c 'zls-git')
|
||||
|
||||
if [ "$river_has_update" -ne 0 ] && [ "$zls_has_update" -ne 0 ]; then
|
||||
zigup master
|
||||
paru -Syu --exclude river-git
|
||||
zigup 0.11.0
|
||||
paru -S river-git
|
||||
zigup master
|
||||
elif [ "$river_has_update" -ne 0 ]; then
|
||||
zigup 0.11.0
|
||||
paru -Syu
|
||||
zigup master
|
||||
else
|
||||
zigup master
|
||||
paru -Syu
|
||||
fi
|
Loading…
Reference in a new issue