Sha256: 1f84618c7c161f2ec46518acc01335fe5841ed0358c6bd4f4e20e7abcd1fae28
Contents?: true
Size: 1.07 KB
Versions: 14
Compression:
Stored size: 1.07 KB
Contents
#!/bin/sh -e . /rebuild/re-build-bootstrap-utils dep_install() { if has_app dnf; then dnf install -y $* #cleaning to make image smaller dnf clean all elif has_app yum; then yum install -y $* #cleaning to make image smaller yum clean all elif has_app apt-get; then apt-get update apt-get install -y $* #cleaning to make image smaller apt-get clean elif has_app apk; then apk update apk add $* elif has_app zypper; then zypper install -y $* #cleaning to make image smaller zypper clean elif has_app urpmi; then urpmi sudo else echo Failed to install "$*", no supported package manager found exit 1 fi } configure_sudo() { echo "ALL ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers } try_install_sudo() { if ! has_app sudo; then dep_install sudo fi return $(has_app sudo) } # Download may fail unpredictably so we try a few times try_install_sudo || try_install_sudo || try_install_sudo configure_sudo
Version data entries
14 entries across 14 versions & 1 rubygems