1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#!/bin/bash
snapshot() {
if [ -x $dir/snapshot ]
then
echo "" > "%svn_test_work%/commit_msg"
i=1
for arg in "$@"; do
if [ "x$arg" = "x" ] ; then
echo -n "''" >> "%svn_test_work%/commit_msg"
else
output=`echo "$arg" | grep " "`
if [ "x$output" != "x" ] ; then
echo -n "'$arg'" >> "%svn_test_work%/commit_msg"
else
echo -n "$arg" >> "%svn_test_work%/commit_msg"
fi
fi
if [ $i != $# ] ; then
echo -n " " >> "%svn_test_work%/commit_msg"
else
echo "" >> "%svn_test_work%/commit_msg"
fi
i=$(($i+1))
done
#echo "$@" > "%svn_test_work%/commit_msg"
$dir/snapshot "%svn_test_work%" > /dev/null 2> /dev/null
fi
}
dir=`dirname $0`
scriptname=`basename $0`
if [ -x $dir/matcher.pl ]
then
# only run jsvn if matched
$dir/matcher.pl "$@"
if [ $? -ne 0 ]
then
# run native
%svn_home%/bin/%name% "$@" < /dev/stdin
sr=$?
snapshot $scriptname "$@"
exit $sr
fi
fi
NG_MAINCLASS=%mainclass%
NG_PORT=%port%
%NG% $NG_MAINCLASS --nailgun-port $NG_PORT %name% "$@"
sr=$?
snapshot $scriptname "$@"
exit $sr
|