Skip to content

Commit

Permalink
Changes: Log time and memory spent
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Anwari committed Nov 20, 2011
1 parent 65ccc62 commit 2662e2a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build-image
Expand Up @@ -43,5 +43,15 @@ if [ -z "$CONFIG" -o -z "$DISK_ID" -o -z "$TMP" ];then
exit 1
fi

LOG_FILE=$TMP/$DISK_ID-publish/log.txt
mkdir -p $TMP/$DISK_ID-publish
$CC_DIR/build-iso 2>&1 | tee $TMP/$DISK_ID-publish/log.txt
set +e
export TIME="Time spent: %E. Memory used: %K"
/usr/bin/time $CC_DIR/build-iso >$LOG_FILE 2>&1

if [ $? -eq 0 ];then
echo "Success."
else
echo "Failed."
fi
set -e

0 comments on commit 2662e2a

Please sign in to comment.