Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add openSUSE zypper installer. #253

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions installer
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ if ! command_exists git; then
elif command_exists pacman; then
_a "Installing using pacman"
sudo pacman -S --noconfirm git 2>&1 | _log "Installing git"
elif command_exists zypper; then
_a "Installing using zypper"
sudo zypper install --no-confirm git 2>&1 | _log "Installing git"
else
case "$OSTYPE" in
darwin*)
Expand Down Expand Up @@ -133,6 +136,9 @@ if ! command_exists curl; then
elif command_exists pacman; then
_a "Installing using pacman"
sudo pacman -S --noconfirm curl 2>&1 | _log "Installing curl"
elif command_exists zypper; then
_a "Installing using zypper"
sudo zypper install --no-confirm curl 2>&1 | _log "Installing curl"
else
_e "Could not install curl, no package provider found"
exit 1
Expand Down
7 changes: 5 additions & 2 deletions restorer
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,13 @@ package_install() {
yes | brew install "${*}" 2>&1 | _log "Installign '${*}' using brew"
elif command_exists pacman; then
_a "Installing '${*}' using pacman"
sudo pacman -S --noconfirm "${*}" >/dev/null 2>&1 | _log "Installign '${*}' using pacman"
sudo pacman -S --noconfirm "${*}" >/dev/null 2>&1 | _log "Installing '${*}' using pacman"
elif command_exists apt; then
_a "Installing '${*}' using apt"
sudo apt -y install "${*}" >/dev/null 2>&1 | _log "Installign '${*}' using apt"
sudo apt -y install "${*}" >/dev/null 2>&1 | _log "Installing '${*}' using apt"
elif command_exists zypper; then
_a "Installing '${*}' using zypper"
sudo zypper install --no-confirm "${*}" 2>&1 | _log "Installing '${*}' using zypper"
else
_e "Could not install '${*}', no package provider found"
return 1
Expand Down
3 changes: 3 additions & 0 deletions scripts/package/package_managers/zypper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zypper::install() {
sudo zypper install --no-confirm "$@"
}