File: runme

package info (click to toggle)
yabasic 2.715-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,332 kB
  • ctags: 1,518
  • sloc: ansic: 11,053; sh: 7,617; perl: 260; makefile: 57
file content (75 lines) | stat: -rwxr-xr-x 1,772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/sh
#
# This script is used to compile yabasic
#

echo 

# remove files, that might interfere
make clean >runme.log 2>&1
rm -f ./yabasic config.cache config.log config.status

# get version from yabasic.h
echo "===Version from configure" >>runme.log
grep "VERSION=" configure >>runme.log 2>&1

# get username
echo "===Output of who" >>runme.log
who -m >>runme.log 2>&1

# get host information
echo "===Output of uname" >>runme.log
uname >>runme.log 2>&1

# list current file
echo "===Files in current directory" >>runme.log
ls -l >>runme.log 2>&1

# preset returncode
RC=0

echo "===Running configure ..." | tee -a runme.log | tr -d =
./configure >>runme.log 2>&1
# sucess ?
if [ $? -eq 0 ]
then 
  echo "===Trying to make yabasic ..." | tee -a runme.log | tr -d =
  make >>runme.log 2>&1
  # sucess ?
  if [ $? -eq 0 ] 
  then
    echo "===Testing yabasic ..." | tee -a runme.log | tr -d =
    make check >>runme.log 2>&1
    # sucess ?
    if [ $? -eq 0 ]
    then    
      echo
      echo "===SUCESS, you may now start yabasic from this directory" | tee -a runme.log | tr -d =
      echo "===or install it in system by typing 'make install' (need to be root)" | tee -a runme.log | tr -d =
      echo
    else
      echo
      echo "===FAILURE, the tests have failed" | tee -a runme.log | tr -d =
      echo "===yabasic has not been built properly !" | tee -a runme.log | tr -d =
      echo
      RC=1
    fi
  else
    echo
    echo "===FAILURE, could not make yabasic !" | tee -a runme.log | tr -d =
    echo
    RC=2
  fi
else
   echo
   echo "===FAILURE, could not configure yabasic" | tee -a runme.log | tr -d =
   echo
   RC=3
fi

# append config.log to runme.log
echo "===config.log:" >>runme.log
touch config.log
cat config.log >>runme.log 2>&1

exit $RC