Created
January 19, 2011 23:14
-
-
Save timwienk/787092 to your computer and use it in GitHub Desktop.
Generate jscoverage-ified versions of MooTools Core and More.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AVAILABLE='core more' | |
SOURCE="$HOME/mootools" | |
TARGET="$HOME/www" | |
JSCOVERAGE='/usr/bin/jscoverage' | |
OPTIONS='--no-instrument=Specs --exclude=Docs --exclude=Tests --exclude=Styles --exclude=Packager --exclude=build --exclude=README.md --exclude=.git --exclude=.gitignore --exclude=.gitmodules' | |
if [ -z "$1" ]; then | |
MODULES=$AVAILABLE | |
else | |
MODULES='' | |
for M in $@; do | |
if [[ $AVAILABLE == *$M* ]]; then | |
MODULES="$MODULES $M" | |
fi | |
done | |
fi | |
for M in $MODULES; do | |
echo "creating $M-coverage..." | |
test -d "$TARGET/$M-coverage" && rm -r "$TARGET/$M-coverage" | |
$JSCOVERAGE $OPTIONS "$SOURCE/mootools-$M" "$TARGET/$M-coverage" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment