diff --git a/bin/wappalyzer b/bin/wappalyzer index 5d42480ac..5c1cb8261 100755 --- a/bin/wappalyzer +++ b/bin/wappalyzer @@ -9,4 +9,4 @@ else exit 1 fi -exit 0 +exit diff --git a/bin/wappalyzer-build b/bin/wappalyzer-build index ebe9fbfbd..215525196 100755 --- a/bin/wappalyzer-build +++ b/bin/wappalyzer-build @@ -7,6 +7,15 @@ then exit 1 fi +wappalyzer validate + +if [ $? -ne 0 ] +then + echo "Build aborted" + + exit 1 +fi + wappalyzer links # Mozilla Firefox diff --git a/bin/wappalyzer-links b/bin/wappalyzer-links index ead8eab98..babe567fd 100755 --- a/bin/wappalyzer-links +++ b/bin/wappalyzer-links @@ -23,6 +23,8 @@ fi path="$path/src" +echo "Creating hard links..." + ln -f $path/wappalyzer.js $path/drivers/firefox/lib ln -f $path/apps.json $path/drivers/firefox/data ln -f $path/icons/*.png $path/drivers/firefox/data/images/icons @@ -53,6 +55,6 @@ ln -f $path/apps.json $path/drivers/ruby ln -f $path/wappalyzer.js $path/drivers/npm ln -f $path/apps.json $path/drivers/npm -echo "Hard links created" +echo "Done" exit 0 diff --git a/bin/wappalyzer-validate b/bin/wappalyzer-validate index 8ef64f769..97bdf40a2 100755 --- a/bin/wappalyzer-validate +++ b/bin/wappalyzer-validate @@ -27,13 +27,19 @@ fi path="$path/src" +echo "Validating apps.json..." + echo -en "${color_err}" jsonlint --quiet $path/apps.json if [ $? -eq 0 ] then - echo -e "${color_ok}No errors found" -fi + echo -e "${color_ok}Ok${color_none}" + + exit 0 +else + echo -en "${color_none}" -echo -en "${color_none}" + exit 1 +fi diff --git a/src/drivers/phantomjs/driver.js b/src/drivers/phantomjs/driver.js index 0ec60947f..83245f5aa 100644 --- a/src/drivers/phantomjs/driver.js +++ b/src/drivers/phantomjs/driver.js @@ -22,7 +22,7 @@ throw new Error('Usage: phantomjs ' + require('system').args[0] + ' '); } - if ( !phantom.injectJs('js/wappalyzer.js') ) { + if ( !phantom.injectJs('wappalyzer.js') ) { throw new Error('Unable to open file js/wappalyzer.js'); }