krebs 4 infest prepare.sh: add support for debian

This commit is contained in:
lassulus 2015-10-30 18:22:25 +01:00
parent b5d527abcc
commit 885c284dd5

View File

@ -21,6 +21,18 @@ prepare() {(
;; ;;
esac esac
;; ;;
debian)
case $VERSION_ID in
7)
prepare_debian "$@"
exit
;;
8)
prepare_debian "$@"
exit
;;
esac
;;
esac esac
elif test -e /etc/centos-release; then elif test -e /etc/centos-release; then
case $(cat /etc/centos-release) in case $(cat /etc/centos-release) in
@ -48,6 +60,14 @@ prepare_centos() {
prepare_common prepare_common
} }
prepare_debian() {
apt-get update
type bzip2 2>/dev/null || apt-get install bzip2
type git 2>/dev/null || apt-get install git
type rsync 2>/dev/null || apt-get install rsync
prepare_common
}
prepare_common() { prepare_common() {
if ! getent group nixbld >/dev/null; then if ! getent group nixbld >/dev/null; then