Turn on debugging
[ci-management.git] / scripts / debug.sh
1 #!/bin/bash
2
3 set -x
4
5 # print the current slave hostname
6 echo "Slave hostname:" $(hostname)
7
8 CCACHE_DIR=/tmp/ccache
9 if [ -d $CCACHE_DIR ];then
10     echo "$CCACHE_DIR size in KB:" $(du -sk $CCACHE_DIR|cut -f1)
11 else
12     echo "$CCACHE_DIR does not exist. Slave" $(uptime -p)
13 fi
14
15 PFX=/etc/bootstrap
16
17 for FILE in "${PFX}.sha" "${PFX}-functions.sha"
18 do
19     test -f ${FILE} || (echo "Cannot find ${FILE}" && continue)
20
21     CMD="cat ${FILE}"
22     echo ${CMD} && eval "${CMD}"
23 done
24
25 echo "sha1 of ${0}:" $(sha1sum $0 | cut -d' ' -f 1)