mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Merge pull request #4312 from wenottingham/check-one-check-two
Add some minimal sanity checking before running the updater script. Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
commit
b2275c0490
@ -7,6 +7,12 @@ requirements="$(readlink -f ./requirements.txt)"
|
||||
requirements_ansible="$(readlink -f ./requirements_ansible.txt)"
|
||||
pip_compile="pip-compile --no-header --quiet -r --allow-unsafe"
|
||||
|
||||
check_prerequisites() {
|
||||
for thing in patch awk python3 python2 virtualenv ; do
|
||||
command -v $thing >/dev/null 2>&1 || { echo "$thing not installed or available. Please fix this before running." ; exit 1 ; }
|
||||
done
|
||||
}
|
||||
|
||||
_cleanup() {
|
||||
cd /
|
||||
test "${KEEP_TMP:-0}" = 1 || rm -rf "${_tmp}"
|
||||
@ -54,6 +60,8 @@ generate_patch() {
|
||||
}
|
||||
|
||||
main() {
|
||||
check_prerequisites
|
||||
|
||||
_tmp="$(mktemp -d --suffix .awx-requirements XXXX -p /tmp)"
|
||||
trap _cleanup INT TERM EXIT
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user