Fixed path in PhantomJS driver, added validate step in build script

main
Elbert Alias 10 years ago
parent 8deb7e7abd
commit bdf6244b1e

@ -9,4 +9,4 @@ else
exit 1 exit 1
fi fi
exit 0 exit

@ -7,6 +7,15 @@ then
exit 1 exit 1
fi fi
wappalyzer validate
if [ $? -ne 0 ]
then
echo "Build aborted"
exit 1
fi
wappalyzer links wappalyzer links
# Mozilla Firefox # Mozilla Firefox

@ -23,6 +23,8 @@ fi
path="$path/src" path="$path/src"
echo "Creating hard links..."
ln -f $path/wappalyzer.js $path/drivers/firefox/lib ln -f $path/wappalyzer.js $path/drivers/firefox/lib
ln -f $path/apps.json $path/drivers/firefox/data ln -f $path/apps.json $path/drivers/firefox/data
ln -f $path/icons/*.png $path/drivers/firefox/data/images/icons 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/wappalyzer.js $path/drivers/npm
ln -f $path/apps.json $path/drivers/npm ln -f $path/apps.json $path/drivers/npm
echo "Hard links created" echo "Done"
exit 0 exit 0

@ -27,13 +27,19 @@ fi
path="$path/src" path="$path/src"
echo "Validating apps.json..."
echo -en "${color_err}" echo -en "${color_err}"
jsonlint --quiet $path/apps.json jsonlint --quiet $path/apps.json
if [ $? -eq 0 ] if [ $? -eq 0 ]
then then
echo -e "${color_ok}No errors found" echo -e "${color_ok}Ok${color_none}"
fi
exit 0
else
echo -en "${color_none}" echo -en "${color_none}"
exit 1
fi

@ -22,7 +22,7 @@
throw new Error('Usage: phantomjs ' + require('system').args[0] + ' <url>'); throw new Error('Usage: phantomjs ' + require('system').args[0] + ' <url>');
} }
if ( !phantom.injectJs('js/wappalyzer.js') ) { if ( !phantom.injectJs('wappalyzer.js') ) {
throw new Error('Unable to open file js/wappalyzer.js'); throw new Error('Unable to open file js/wappalyzer.js');
} }

Loading…
Cancel
Save