Skip to content

Commit f570fba

Browse files
committed
Support linux
1 parent 6d26278 commit f570fba

File tree

1 file changed

+15
-3
lines changed
  • bin/common/.local/bin

1 file changed

+15
-3
lines changed

bin/common/.local/bin/bus

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
set -eu -o pipefail
4-
53
if [ "$(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
2725
elif [ "$(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
2941
else
3042
echo "Unsupported platform: $(uname)"
3143
exit 1

0 commit comments

Comments
 (0)