Update bin/setup
This commit is contained in:
parent
2b16e51ee9
commit
3f776e41b1
1 changed files with 20 additions and 3 deletions
23
bin/setup
23
bin/setup
|
@ -15,9 +15,10 @@ printerr()
|
||||||
|
|
||||||
require_dependency()
|
require_dependency()
|
||||||
{
|
{
|
||||||
|
local cmd
|
||||||
for i in $(seq 1 $#); do
|
for i in $(seq 1 $#); do
|
||||||
eval "cmd=\$${i}"
|
eval "cmd=\$${i}"
|
||||||
if which ${cmd} > /dev/null 2>&1; then
|
if which "${cmd}" > /dev/null 2>&1; then
|
||||||
printok "${cmd} found"
|
printok "${cmd} found"
|
||||||
else
|
else
|
||||||
printerr "${cmd} is required but was not found on \$PATH"
|
printerr "${cmd} is required but was not found on \$PATH"
|
||||||
|
@ -38,5 +39,21 @@ printok "ruby dependencies installed"
|
||||||
npm i
|
npm i
|
||||||
printok "nodejs dependencies installed"
|
printok "nodejs dependencies installed"
|
||||||
|
|
||||||
cp nanoc.yaml.sample nanoc.yaml
|
if [ ! -e "nanoc.yaml" ]; then
|
||||||
printok "nanoc.yaml.sample -> nanoc.yaml"
|
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
|
||||||
|
|
Loading…
Reference in a new issue