Alter(or mess with) sun4i target flags a bit
[AROS.git] / scripts / nightly / functions
blobd34a46516fe097ffe7e98503ad66f9cfdcad08a6
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 lhaarc()
74     archdir=$(dirname $1)
75     archname=$(basename $1)
76     oldpwd=$(pwd)
77     
78     makedir $archdir
79     execute lha -a -x=\*/.svn/\* $1 $2
80     cd      $archdir
81     echo    ">>> md5sum $archname >$archname.md5"
82     md5sum  $archname >$archname.md5
83     cd      $oldpwd
86 resetl()
88     LOG_THIS=/dev/null
91 setl()
93     LOG_THIS=$LOG_BASE/$1
94     if [ ! -f $LOG_THIS ]; then
95         touch $LOG_THIS >/dev/null
96     fi