#!/bin/bash path=$1 if [ -z $path ] then if [ -z $WAPPALYZER_ROOT ] then echo "-$(basename $0): No path specified" exit 1 fi path=$WAPPALYZER_ROOT fi set -eu if [ ! -d $path/src ] then echo "-$(basename $0): Incorrect path" exit 1 fi path="$path/src" echo "Creating hard links..." ln -f $path/wappalyzer.js $path/drivers/phantomjs ln -f $path/apps.json $path/drivers/phantomjs ln -f $path/wappalyzer.js $path/drivers/firefox ln -f $path/apps.json $path/drivers/firefox/data ln -f $path/icons/*.png $path/drivers/firefox/data/images/icons ln -f $path/icons/*.svg $path/drivers/firefox/data/images/icons ln -f $path/utils/iframe.js $path/drivers/firefox/data/js ln -f $path/wappalyzer.js $path/drivers/chrome/js ln -f $path/apps.json $path/drivers/chrome ln -f $path/icons/*.png $path/drivers/chrome/images/icons ln -f $path/icons/*.svg $path/drivers/chrome/images/icons ln -f $path/utils/*.js $path/drivers/chrome/js if [ "$(compgen -G "$path/icons/converted/*.png" | head -n1)" ]; then ln -f $path/icons/converted/*.png $path/drivers/chrome/images/icons/converted fi ln -f $path/wappalyzer.js $path/drivers/bookmarklet/js ln -f $path/icons/*.png $path/drivers/bookmarklet/images/icons ln -f $path/icons/*.svg $path/drivers/bookmarklet/images/icons echo "OK" exit 0