tools fmt

This commit is contained in:
Daylin Morgan 2022-01-09 18:16:55 -06:00
parent 35fb1fc84b
commit ec3556e91b

View file

@ -44,14 +44,11 @@ eget_tool() {
echo
}
if ! $(is-executable eget); then
echo "I don't see eget on your path..."
read -p "Do you want to download it to ${BIN_DIR}? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
else
curl https://zyedidia.github.io/eget.sh | sh
@ -65,13 +62,12 @@ if ! $(is-executable yq); then
eget mikefarah/yq --asset yq_linux_amd64
fi
if ! [ -z "$1" ]; then
tool=$1
echo "installing $tool"
info=$(key=$tool yq e 'explode(.) | .[env(key)]' $YAMLDOC)
if [[ "$info" == "null" ]]; then
if [[ $info == "null" ]]; then
echo "$tool not found in $YAMLDOC"
echo "exiting"
exit 1
@ -85,7 +81,6 @@ echo "no tool specified installing everything"
readarray tools < <(yq e 'keys | .[]' $YAMLDOC)
for tool in "${tools[@]:1}"
do
for tool in "${tools[@]:1}"; do
eget_tool $tool
done