chore: setup devfiles

This commit is contained in:
Alexander Navarro 2025-02-05 11:59:43 -03:00
parent 7c6cd6967a
commit 981e35124a
11 changed files with 109 additions and 17 deletions

View file

View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail
root="$(git rev-parse --show-toplevel)"
export PATH=$root/.devfiles/bin:$root/.devfiles/scripts:$PATH
devtools=(
age
agebox
cog
gitleaks
)
missing_tools=()
for cmd in "${devtools[@]}"; do
if ! command -v "$cmd" &>/dev/null; then
missing_tools+=("$cmd")
fi
done
if [[ ${#missing_tools[@]} != 0 ]]; then
echo "The following tools where not found:"
printf "%s\n" "${missing_tools[@]}"
exit 1
else
echo -e "All tools are installed!"
fi