-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eric Nemchik <[email protected]>
- Loading branch information
Showing
7 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_clean() { | ||
info "apk does not require cleanup." | ||
} | ||
|
||
test_pm_apk_clean() { | ||
run_script 'pm_apk_clean' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_install() { | ||
notice "Installing dependencies. 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 "sudo apk add coreutils curl git grep newt sed ${REDIRECT}" || fatal "Failed to install dependencies from apk.\nFailing command: ${F[C]}sudo apk add coreutils curl git grep newt sed" | ||
} | ||
|
||
test_pm_apk_install() { | ||
run_script 'pm_apk_repos' | ||
run_script 'pm_apk_install' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_install_docker() { | ||
notice "Installing docker. 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 "sudo apk add docker docker-cli-compose ${REDIRECT}" || fatal "Failed to install docker and docker-compose using pacman.\nFailing command: ${F[C]}sudo apk add docker docker-cli-compose" | ||
|
||
} | ||
|
||
test_pm_apk_install_docker() { | ||
run_script 'pm_apk_repos' | ||
run_script 'pm_apk_install_docker' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_repos() { | ||
info "apk does not require additional repositories." | ||
} | ||
|
||
test_pm_apk_repos() { | ||
run_script 'pm_apk_repos' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
pm_apk_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 "sudo apk upgrade ${REDIRECT}" || fatal "Failed to upgrade packages from apk.\nFailing command: ${F[C]}sudo apk upgrade" | ||
fi | ||
} | ||
|
||
test_pm_apk_upgrade() { | ||
run_script 'pm_apk_upgrade' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters