All strings are localised in wpeditor.c
[cake.git] / scripts / nightly / functions
blobc3df6bc00da33eb43e558c83e7f348406b26f76b
2 # Codes:
3 # ---   = Information
4 # !!!   = Error
5 # >>>   = Executing command
7 print()
9     echo $* | tee -a $LOG_ALL | tee -a $LOG_THIS
12 printi()
14     print '---' $*
17 printe()
19     print '!!!' $* 
22 printx()
24     print '>>>' $*
28 execute()
30     printx $*
31     (
32         $*
33         if [ $? != 0 ]; then
34             touch /tmp/_aros_build_fail
35         fi
36     ) 2>&1 | tee -a $LOG_ALL | tee -a $LOG_THIS
37     if [ -f /tmp/_aros_build_fail ]; then
38         printe "Command '$*' returned error. ABORTING BUILD!"
39         rm -f /tmp/_aros_build_fail
40         exit 5
41     fi
44 archive()
46     archdir=$(dirname $1)
47     archname=$(basename $1)
48     oldpwd=$(pwd)
49     
50     makedir $archdir
51     execute tar cjvf $1 --exclude=.svn $2
52     cd      $archdir
53     echo    ">>> md5sum $archname >$archname.md5"
54     md5sum  $archname >$archname.md5
55     cd      $oldpwd
58 ziparc()
60     archdir=$(dirname $1)
61     archname=$(basename $1)
62     oldpwd=$(pwd)
63     
64     makedir $archdir
65     execute zip -r9 $1 $2 -x \*/.svn/\*
66     cd      $archdir
67     echo    ">>> md5sum $archname >$archname.md5"
68     md5sum  $archname >$archname.md5
69     cd      $oldpwd
72 resetl()
74     LOG_THIS=/dev/null
77 setl()
79     LOG_THIS=$LOG_BASE/$1
80     if [ ! -f $LOG_THIS ]; then
81         touch $LOG_THIS >/dev/null
82     fi