Last active
January 28, 2020 02:58
-
-
Save echosa/390b968093c37e459ec38cd510d30de0 to your computer and use it in GitHub Desktop.
Revisions
-
echosa revised this gist
May 17, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ apt_search_exact() { apt search ^$1$ } apt_upgrade() { sudo apt update; sudo apt upgrade } PACKAGE_MANAGERS+=("brew") -
echosa revised this gist
May 17, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -71,7 +71,6 @@ for PACKAGE_MANAGER in "${PACKAGE_MANAGERS[@]}"; do echo "####################" echo $PACKAGE_MANAGER echo "####################" if [ -x "$(command -v $PACKAGE_MANAGER)" ]; then COMMAND_FUNCTION=$PACKAGE_MANAGER"_"$1 if [ "$(type -t $COMMAND_FUNCTION)" = "function" ]; then -
echosa revised this gist
May 17, 2019 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,9 @@ PACKAGE_MANAGERS=() PACKAGE_MANAGERS+=("apt") apt_clean() { sudo apt autoremove } apt_search() { apt search $1 } @@ -12,11 +15,11 @@ apt_search_exact() { apt_upgrade() { sudo apt update; sudo apt upgrade; sudo apt autoremove } PACKAGE_MANAGERS+=("brew") brew_clean() { brew cleanup } brew_search() { brew search $1 } @@ -26,9 +29,6 @@ brew_search_exact() { brew_upgrade() { brew update; brew upgrade } PACKAGE_MANAGERS+=("flatpak") flatpak_search() { @@ -42,6 +42,9 @@ flatpak_upgrade() { } PACKAGE_MANAGERS+=("guix") guix_clean() { guix package --delete-generations; guix gc --collect-garbage; guix gc --list-dead } guix_search() { guix package -A $1 } @@ -51,9 +54,6 @@ guix_search_exact() { guix_upgrade() { guix pull; guix package -u } PACKAGE_MANAGERS+=("snap") snap_search() { -
echosa revised this gist
May 17, 2019 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,9 @@ apt_search_exact() { apt_upgrade() { sudo apt update; sudo apt upgrade; sudo apt autoremove } apt_clean() { sudo apt autoremove } PACKAGE_MANAGERS+=("brew") brew_search() { @@ -23,6 +26,9 @@ brew_search_exact() { brew_upgrade() { brew update; brew upgrade } brew_clean() { brew cleanup } PACKAGE_MANAGERS+=("flatpak") flatpak_search() { @@ -45,6 +51,9 @@ guix_search_exact() { guix_upgrade() { guix pull; guix package -u } guix_clean() { guix package --delete-generations; guix gc --collect-garbage; guix gc --list-dead } PACKAGE_MANAGERS+=("snap") snap_search() { -
echosa revised this gist
May 13, 2019 . 2 changed files with 76 additions and 25 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,76 @@ #!/bin/bash PACKAGE_MANAGERS=() PACKAGE_MANAGERS+=("apt") apt_search() { apt search $1 } apt_search_exact() { apt search ^$1$ } apt_upgrade() { sudo apt update; sudo apt upgrade; sudo apt autoremove } PACKAGE_MANAGERS+=("brew") brew_search() { brew search $1 } brew_search_exact() { brew search /^$1$/ } brew_upgrade() { brew update; brew upgrade } PACKAGE_MANAGERS+=("flatpak") flatpak_search() { flatpak search $1 } flatpak_search_exact() { flatpak_search $1 } flatpak_upgrade() { flatpak update } PACKAGE_MANAGERS+=("guix") guix_search() { guix package -A $1 } guix_search_exact() { guix package -A ^$1$ } guix_upgrade() { guix pull; guix package -u } PACKAGE_MANAGERS+=("snap") snap_search() { snap find $1 } snap_search_exact() { snap_search $1 } snap_upgrade() { sudo snap refresh } for PACKAGE_MANAGER in "${PACKAGE_MANAGERS[@]}"; do echo "####################" echo "####################" echo $PACKAGE_MANAGER echo "####################" echo "####################" if [ -x "$(command -v $PACKAGE_MANAGER)" ]; then COMMAND_FUNCTION=$PACKAGE_MANAGER"_"$1 if [ "$(type -t $COMMAND_FUNCTION)" = "function" ]; then eval ${COMMAND_FUNCTION} $2 else echo Package manager $PACKAGE_MANAGER has no defined $1 command. fi else echo Package manager $PACKAGE_MANAGER not found. fi done This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,25 +0,0 @@ -
echosa revised this gist
May 7, 2019 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,3 +18,8 @@ if [ -x "$(command -v snap)" ]; then echo "Refreshing snaps..." sudo snap refresh fi if [ -x "$(command -v guix)" ]; then echo "Upgrading Guix packages..." guix pull; guix package -u fi -
echosa created this gist
May 1, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/bin/sh if [ -x "$(command -v apt)" ]; then echo "Upgrading apt packages..." sudo apt update; sudo apt upgrade; sudo apt autoremove fi if [ -x "$(command -v flatpak)" ]; then echo "Upgrading flatpaks..." flatpak update fi if [ -x "$(command -v brew)" ]; then echo "Upgrading Homebrew formulae..." brew update; brew upgrade fi if [ -x "$(command -v snap)" ]; then echo "Refreshing snaps..." sudo snap refresh fi