Update bin/setup

This commit is contained in:
0x1eef 2024-08-20 19:20:35 -03:00
parent 2b16e51ee9
commit 3f776e41b1

View file

@ -15,9 +15,10 @@ printerr()
require_dependency()
{
local cmd
for i in $(seq 1 $#); do
eval "cmd=\$${i}"
if which ${cmd} > /dev/null 2>&1; then
if which "${cmd}" > /dev/null 2>&1; then
printok "${cmd} found"
else
printerr "${cmd} is required but was not found on \$PATH"
@ -38,5 +39,21 @@ printok "ruby dependencies installed"
npm i
printok "nodejs dependencies installed"
if [ ! -e "nanoc.yaml" ]; then
cp nanoc.yaml.sample nanoc.yaml
printok "nanoc.yaml.sample -> nanoc.yaml"
fi
found=0
for t in tidy tidy5; do
if which ${t} > /dev/null 2>&1; then
found=1
break
fi
done
if [ "${found}" = "1" ]; then
printok "tidy-html5 found"
else
printerr "tidy-html5 is required but was not found on \$PATH"
fi