summaryrefslogtreecommitdiff
path: root/build_test.sh
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-02-15 14:52:19 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-02-15 14:52:19 +0000
commit38e9f1febcdf5e7f74a1916ddb63a7c95a372ad4 (patch)
treeadd33b08b0f4691d6ff849c67ca69729fbde9740 /build_test.sh
parent2259dea9a7937bed31ef8f5545d2b5be8b56c629 (diff)
Use tee for logging
Diffstat (limited to 'build_test.sh')
-rwxr-xr-xbuild_test.sh25
1 files changed, 12 insertions, 13 deletions
diff --git a/build_test.sh b/build_test.sh
index 5fdc7382..2a90cc19 100755
--- a/build_test.sh
+++ b/build_test.sh
@@ -1,13 +1,12 @@
#!/bin/sh
-exec 2>&1
+#exec 2>&1
-BUILD_TEST_DIR=/tmp/aria2_build_test
+BUILDDIR=/tmp/aria2buildtest
-if [ ! -d "$BUILD_TEST_DIR" ]; then
- mkdir "$BUILD_TEST_DIR" \
- || echo "Failed to create directory $BUILD_TEST_DIR" \
- && exit -1
+if [ ! -d "$BUILDDIR" ]; then
+ mkdir "$BUILDDIR" \
+ || { echo "Failed to create directory $BUILDDIR" && exit -1; }
fi
echo -n "Starting build test "
@@ -20,20 +19,20 @@ build()
echo `date`
echo "*** configure opts=$1"
BIN_NAME="aria2c_$2"
- if [ -f "$BUILD_TEST_DIR/$BIN_NAME" ]; then
+ if [ -f "$BUILDDIR/$BIN_NAME" ]; then
echo "$BIN_NAME exists, skipping"
return
fi
- ./configure $1 \
- && cp config.log "$BUILD_TEST_DIR/config.log_$2" \
- && LANG=C make -j2 check > "$BUILD_TEST_DIR/aria2c_$2.log" \
- && cp src/aria2c "$BUILD_TEST_DIR/aria2c_$2"
+ ./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log"\
+ && cp config.log "$BUILDDIR/config.log_$2" \
+ && LANG=C make -j2 check 2>&1 |tee "$BUILDDIR/aria2c_$2.log" \
+ && cp src/aria2c "$BUILDDIR/aria2c_$2"
}
clear()
{
- for file in `ls $BUILD_TEST_DIR`; do
- rm -f "$BUILD_TEST_DIR/$file";
+ for file in `ls $BUILDDIR`; do
+ rm -f "$BUILDDIR/$file";
done
}