From 7950c8c4b85bb93424d73c10313a36de242aa684 Mon Sep 17 00:00:00 2001 From: Xavier Petit <32063953+xpetit@users.noreply.github.com> Date: Fri, 29 Nov 2019 11:49:03 +0000 Subject: [PATCH] Add preliminary script to check dependencies --- scripts/check_installation.sh | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 scripts/check_installation.sh diff --git a/scripts/check_installation.sh b/scripts/check_installation.sh new file mode 100755 index 00000000..95722544 --- /dev/null +++ b/scripts/check_installation.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=' +' + +dir=$(cd -P "$(dirname "$BASH_SOURCE")" && pwd) + +check() { + test "$(command -v "$1")" && echo -n ✅ || echo -n ❌ + echo " $@" +} + +check go '(see : https://golang.org/dl & https://golang.org/doc/install)' +check gofmt '(see : https://golang.org/dl & https://golang.org/doc/install)' +check goimports '(run : go get golang.org/x/tools/cmd/goimports)' +check git '(see : https://git-scm.com/downloads)' +check jq '(see : https://stedolan.github.io/jq/download)' +check sed +check tar +check find +check cut +check awk +check grep +check wget +check curl +check diff +check chmod +check chown +check touch +check wc +check cat + +test "$(ls ~/.ssh/*.pub 2>/dev/null)" && echo -n ✅ || echo -n ❌ +echo " SSH public key (run : ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '')" + +# git repository configured