File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- set -eu -o pipefail
4-
53if [ " $( uname) " = " Darwin" ]; then
64 homebrew_dir=" $HOME /.config/homebrew"
75
@@ -25,7 +23,21 @@ if [ "$(uname)" = "Darwin" ]; then
2523 echo -e " \033[34m==>\033[0m Running brew cleanup..."
2624 brew cleanup
2725elif [ " $( uname) " = " Linux" ]; then
28- echo " Installing on linux"
26+ if command -v paru > /dev/null 2>&1 ; then
27+ mapfile -t pkgs < <(
28+ cat " $HOME " /.config/pkglist/{base_packages.txt,aur_packages.txt} 2> /dev/null |
29+ sed ' s/#.*//' |
30+ awk ' NF' |
31+ sort -u
32+ )
33+ paru -Syyu --needed -- " ${pkgs[@]} "
34+ elif command -v apt-get > /dev/null 2>&1 ; then
35+ sudo apt-get update
36+ sudo apt-get upgrade
37+ else
38+ echo " No known package manager"
39+ exit 1
40+ fi
2941else
3042 echo " Unsupported platform: $( uname) "
3143 exit 1
You can’t perform that action at this time.
0 commit comments