Skip to content

Instantly share code, notes, and snippets.

@timwienk
Created January 19, 2011 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timwienk/787092 to your computer and use it in GitHub Desktop.
Save timwienk/787092 to your computer and use it in GitHub Desktop.
Generate jscoverage-ified versions of MooTools Core and More.
#!/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