Generalize update command
This commit is contained in:
parent
1614ab114d
commit
52d97d3f98
2 changed files with 25 additions and 5 deletions
|
@ -1,5 +0,0 @@
|
||||||
function macos_update
|
|
||||||
brew upgrade
|
|
||||||
gup update
|
|
||||||
cargo install-update --all
|
|
||||||
end
|
|
25
fish/functions/update.fish
Normal file
25
fish/functions/update.fish
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
function update
|
||||||
|
switch (uname)
|
||||||
|
case Linux
|
||||||
|
if type -q yay
|
||||||
|
yay
|
||||||
|
end
|
||||||
|
|
||||||
|
if type -q flatpak
|
||||||
|
flatpak update
|
||||||
|
end
|
||||||
|
case Darwin
|
||||||
|
brew upgrade
|
||||||
|
case '*'
|
||||||
|
echo "Unsupported OS"
|
||||||
|
exit 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if type -q gup
|
||||||
|
gup update
|
||||||
|
end
|
||||||
|
|
||||||
|
if type -q cargo
|
||||||
|
cargo install-update --all
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue