From 7cb09246192d0a93db519796e040aedbe3d53e24 Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Mon, 29 Jan 2024 20:29:47 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Up=20function=20-=20to=20update=20s?= =?UTF-8?q?oftware?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fish/.config/fish/functions/up.fish.symlink | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/fish/.config/fish/functions/up.fish.symlink b/fish/.config/fish/functions/up.fish.symlink index f5717f4..01f08e5 100644 --- a/fish/.config/fish/functions/up.fish.symlink +++ b/fish/.config/fish/functions/up.fish.symlink @@ -1,22 +1,18 @@ #!/usr/bin/env fish -source "$DOT/script/utils.fish" - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - function up -d "Update all software across all package managers" - set -f cmd "brew update && brew upgrade && brew cleanup" - set -a cmd "npm install npm -g && npm update -g" + brew update && brew upgrade && brew cleanup + npm install npm -g && npm update -g - if cmd_exists 'gem' - set -a cmd "sudo gem update --system && sudo gem update && sudo gem cleanup" + if command -v gem &>/dev/null + sudo gem update --system && sudo gem update && sudo gem cleanup end if [ "$(uname)" = "Darwin" ] - set -p cmd "sudo softwareupdate --install --all" + sudo softwareupdate --install --all else if [ "$(uname)" = "Linux" ] - set -p cmd "sudo apt update && sudo apt upgrade" + sudo apt update && sudo apt upgrade end - - echo (string join '; ' $cmd) end