Implement Pacman Scripts and Update Readme
MODIFY
.scripts/package_manager_run.sh
.scripts/package_manager_run.sh
@@ -11,10 +11,10 @@ package_manager_run() {
elif [[ -n "$(command -v yum)" ]]; then
run_script "pm_yum_${ACTION}"
elif [[ -n "$(command -v pacman)" ]]; then
- warn "Arch Linux based distributions are not officially supported."
- warn "You will need to install docker and docker-compose manually."
+ info "Docker packages for Arch Linux based distributions are not installed automatically."
+ run_script "pm_pacman_${ACTION}"
else
- fatal "Package manager not detected!"
+ fatal "Supported package manager not detected!"
fi
}

ADD
.scripts/pm_pacman_clean.sh
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+pm_pacman_clean() {
+ info "Cleaning up package cache."
+ pacman -Sc --noconfirm > /dev/null 2>&1 || info "Failed to cleanup pacman cache."
+}
+
+test_pm_pacman_clean() {
+ # run_script 'pm_pacman_clean'
+ warn "CI does not test pm_pacman_clean."
+}

ADD
.scripts/pm_pacman_install.sh
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+pm_pacman_install() {
+ info "Installing dependencies."
+ pacman -Sy --noconfirm curl git grep libnewt sed > /dev/null 2>&1 || fatal "Failed to install dependencies using pacman."
+}
+
+test_pm_pacman_install() {
+ # run_script 'pm_pacman_install'
+ warn "CI does not test pm_pacman_install."
+}

ADD
.scripts/pm_pacman_remove_docker.sh
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+pm_pacman_remove_docker() {
+ info "This script does not install or remove docker with pacman. You will need to do this manually."
+}
+
+test_pm_pacman_remove_docker() {
+ # run_script 'pm_pacman_remove_docker'
+ warn "CI does not test pm_pacman_remove_docker."
+}

ADD
.scripts/pm_pacman_repos.sh
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+pm_pacman_repos() {
+ return # All packages needed are in the Arch repos
+}
+
+test_pm_pacman_repos() {
+ # run_script 'pm_pacman_repos'
+ warn "CI does not test pm_pacman_repos."
+}

ADD
.scripts/pm_pacman_upgrade.sh
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+pm_pacman_upgrade() {
+ if [[ ${CI:-} != true ]]; then
+ notice "Upgrading packages. Please be patient, this can take a while."
+ local REDIRECT="> /dev/null 2>&1"
+ if [[ -n ${VERBOSE:-} ]] || run_script 'question_prompt' "${PROMPT:-CLI}" N "Would you like to display the command output?"; then
+ REDIRECT=""
+ fi
+ eval pacman -Syu --noconfirm "${REDIRECT}" || fatal "Failed to upgrade packages from pacman."
+ fi
+}
+
+test_pm_pacman_upgrade() {
+ # run_script 'pm_pacman_upgrade'
+ warn "CI does not test pm_pacman_upgrade."
+}

MODIFY
README.md
README.md
@@ -65,6 +65,16 @@ bash -c "$(curl -fsSL https://get.dockstarter.com)"
sudo reboot
```
+- Pacman Systems (Arch, Manjaro, EndeavourOS, etc)
+
+> Note that systems with the `pacman` package manager will not install `docker` via the [https://get.docker.com](https://get.docker.com) script that is used for other distros. The instructions below provide information on installing all required packages manually prior to installing DockSTARTer.
+
+```bash
+sudo pacman -Sy curl docker docker-compose git
+bash -c "$(curl -fsSL https://get.dockstarter.com)"
+sudo reboot
+```
+
<details>
<summary>Alternate install (any system)</summary>

Implement Pacman Scripts and Update Readme