diff --git a/installer b/installer index dc284abf..bbb17ada 100755 --- a/installer +++ b/installer @@ -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*) @@ -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 diff --git a/restorer b/restorer index 61b77718..e252ad1e 100644 --- a/restorer +++ b/restorer @@ -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 diff --git a/scripts/package/package_managers/zypper.sh b/scripts/package/package_managers/zypper.sh new file mode 100644 index 00000000..7c181ada --- /dev/null +++ b/scripts/package/package_managers/zypper.sh @@ -0,0 +1,3 @@ +zypper::install() { + sudo zypper install --no-confirm "$@" +}