Update get
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
pkgs="$@"
|
pkgs="$@"
|
||||||
|
installer="echo "error: something went wrong" ; exit 1"
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
return command -v xbps-install >dev/null 2>&1
|
return command -v xbps-install >dev/null 2>&1
|
||||||
}
|
}
|
||||||
@@ -11,6 +13,13 @@ elif check pacman; then
|
|||||||
installer="sudo pacman -Syu"
|
installer="sudo pacman -Syu"
|
||||||
elif check apt; then
|
elif check apt; then
|
||||||
installer="sudo apt install -y"
|
installer="sudo apt install -y"
|
||||||
|
elif check dnf; then
|
||||||
|
installer="sudo dnf install -y"
|
||||||
|
elif check brew; then
|
||||||
|
installer="brew install"
|
||||||
else
|
else
|
||||||
echo Could not find package manager.
|
echo "error: could not find package manager." ; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
$installer $pkgs && echo "done." && exit 0
|
||||||
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user