-
-
Save Milly/53175 to your computer and use it in GitHub Desktop.
autorun make or ant
This file contains hidden or 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/sh | |
MAKECMD=/usr/bin/make | |
# ANTCMD=/usr/local/bin/ant | |
ANTCMD=/cygdrive/c/dev/ant/bin/ant | |
FILTER="/usr/bin/nkf -Swud" | |
if [ -r Makefile -o -r makefile ]; then | |
"$MAKECMD" "$@" | |
elif [ -r build.xml ]; then | |
[ -x "$FILTER" ] && filter="2>&1|$FILTER" | |
case `uname` in | |
CYGWIN*) | |
awkprg=$(cat <<-'EOS' | |
BEGIN { | |
file="\\<[A-Za-z]:(\\\\[^\\\\/:*?\"<>|]+)+\\\\?" | |
} | |
{ | |
if (match($0, file)) { | |
cmd=("cygpath -u '" substr($0, RSTART, RLENGTH) "'"); | |
cmd |getline cygfile; | |
close(cmd); | |
sub(file, cygfile) | |
} | |
} | |
EOS) | |
filter="$filter|awk \"\$awkprg\"" | |
;; | |
esac | |
eval "'$ANTCMD' \"\$@\" $filter" | |
else | |
echo 'Makefile or build.xml not found.' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment