diff options
Diffstat (limited to 'common/init')
-rw-r--r-- | common/init | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/common/init b/common/init index b1d2eb4..5dcc67b 100644 --- a/common/init +++ b/common/init @@ -14,6 +14,13 @@ remove_self() { rm "$(realpath "$0")" rm "$(realpath "$(dirname "$0")")/shell_line_editor.sh" } +require() { + program="$1" + if ! command -v "$program" >/dev/null; then + echo "Please install '$program' for this init script to work." 1>&2 + exit 1 + fi +} # Prompt the user for a specific variable. # ## Args: @@ -47,6 +54,16 @@ prompt() { printf "%s\n" "$pr_new_variable" >>"$replacement_file" } +require git + +require jq +require curl + +require fd +require mv +require sed +require chmod + git init # necessary meta data |