Files
gerrit/polygerrit-ui/app/polylint_test.sh
Orgad Shaneh 3d2fdd0d98 Scripts: Use bash in shebang
These scripts use [[, which is not POSIX compliant.

Change-Id: I9dbb3334e44fba0c88c54c1ef0f2f4d1b3932088
2018-12-19 17:05:08 +02:00

20 lines
488 B
Bash
Executable File

#!/bin/bash
set -ex
npm_bin=$(which npm)
if [[ -z "$npm_bin" ]]; then
echo "NPM must be on the path."
exit 1
fi
polylint_bin=$(which polylint)
if [[ -z "$polylint_bin" ]]; then
echo "You must install polylint and its dependencies from NPM."
echo "> npm install -g polylint"
exit 1
fi
unzip -o polygerrit-ui/polygerrit_components.bower_components.zip -d polygerrit-ui/app
${polylint_bin} --root polygerrit-ui/app --input elements/gr-app.html --b 'bower_components'