install scrpts
This commit is contained in:
@@ -72,6 +72,11 @@ prepare_downloader() {
|
||||
DOWNLOADER="curl"
|
||||
return
|
||||
fi
|
||||
if command_exists pacman; then
|
||||
pacman -Sy --noconfirm --needed curl ca-certificates tar gzip python sudo
|
||||
DOWNLOADER="curl"
|
||||
return
|
||||
fi
|
||||
|
||||
fail "curl or wget is required and no supported package manager was found."
|
||||
}
|
||||
@@ -103,6 +108,9 @@ detect_os_family() {
|
||||
*rhel*|*fedora*|*centos*|*rocky*|*almalinux*)
|
||||
echo "rhel"
|
||||
;;
|
||||
*arch*)
|
||||
echo "arch"
|
||||
;;
|
||||
*)
|
||||
fail "Unsupported OS: ID=${ID:-unknown}, ID_LIKE=${ID_LIKE:-unknown}."
|
||||
;;
|
||||
@@ -129,6 +137,7 @@ if ! download_file "${ARCHIVE_URL}" "${ARCHIVE_PATH}"; then
|
||||
for file in \
|
||||
install_stack_debian_ubuntu.sh \
|
||||
install_stack_rhel.sh \
|
||||
install_stack_arch.sh \
|
||||
install_pytorrent_rhel.sh \
|
||||
install_rtorrent.py \
|
||||
install_rtorrent_rhel.py \
|
||||
@@ -153,6 +162,9 @@ case "${OS_FAMILY}" in
|
||||
rhel)
|
||||
INSTALLER="${PROJECT_DIR}/scripts/stack_installers/install_stack_rhel.sh"
|
||||
;;
|
||||
arch)
|
||||
INSTALLER="${PROJECT_DIR}/scripts/stack_installers/install_stack_arch.sh"
|
||||
;;
|
||||
*)
|
||||
fail "Unsupported OS family: ${OS_FAMILY}."
|
||||
;;
|
||||
@@ -160,4 +172,4 @@ esac
|
||||
|
||||
chmod +x "${PROJECT_DIR}/scripts/stack_installers/"*.sh || true
|
||||
log "Running ${INSTALLER}"
|
||||
bash "${INSTALLER}"
|
||||
bash "${INSTALLER}" "$@"
|
||||
|
||||
Reference in New Issue
Block a user