diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2022-09-04 17:02:35 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2022-09-04 17:02:35 -0400 |
| commit | 9cbca7991457b05bcfcc5017060437dd3af489a5 (patch) | |
| tree | cebeeaebd4ad613bea739db8fadc1d630f43724f /bootstrap | |
| parent | Add bsd updates (diff) | |
| download | dotfiles-9cbca7991457b05bcfcc5017060437dd3af489a5.zip | |
Convert from src/ to roles structure
Diffstat (limited to 'bootstrap')
| -rwxr-xr-x | bootstrap | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..5905df3 --- /dev/null +++ b/bootstrap @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +escalate() { + if [ -x "$(command -v sudo)" ]; then + sudo $@ + else + echo "sudo not found to escalate permissions" + exit 1 + fi +} + +if ! [ -x "$(command -v ansible-playbook)" ]; then + case "$(uname -s)" in + Linux) + source /etc/os-release + + if [ "$ID" != "fedora" ]; then + echo "[!] Unsupported Linux Distribution" + exit 1 + fi + + escalate dnf install --assumeyes ansible + ;; + *) + echo "[!] Unsupported OS" + exit 1 + ;; + esac +fi |