|
@ -11,23 +11,33 @@ if [ -z "$1" -o "$1" == "--help" ]; then |
|
|
exit 0 |
|
|
exit 0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if test -d root; then |
|
|
|
|
|
exist_root=true |
|
|
|
|
|
else |
|
|
|
|
|
exist_root=false |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
logfile=$(mktemp makelog.XXXXXX) |
|
|
logfile=$(mktemp makelog.XXXXXX) |
|
|
trap "rm -f $logfile" EXIT |
|
|
trap "rm -f $logfile" EXIT |
|
|
|
|
|
|
|
|
params="$*" |
|
|
params="$*" |
|
|
|
|
|
|
|
|
pushd root |
|
|
if $exist_root; then |
|
|
test -d .git || git init |
|
|
pushd root |
|
|
git add . |
|
|
test -d .git || git init |
|
|
git commit -a -m"- before $params" |
|
|
git add . |
|
|
popd |
|
|
git commit -a -m"- before $params" |
|
|
|
|
|
popd |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
time make $params 2>&1 | tee $logfile |
|
|
time make $params 2>&1 | tee $logfile |
|
|
|
|
|
|
|
|
pushd root |
|
|
if $exist_root; then |
|
|
git add . |
|
|
pushd root |
|
|
git commit -a -m"- after $params" |
|
|
git add . |
|
|
popd |
|
|
git commit -a -m"- after $params" |
|
|
|
|
|
popd |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
mkdir -p build_tmp |
|
|
mkdir -p build_tmp |
|
|
echo -e "\nmake $*:\n" >> build_tmp/make_${params// /_}.log |
|
|
echo -e "\nmake $*:\n" >> build_tmp/make_${params// /_}.log |
|
|