File: simulate.sh

package info (click to toggle)
libchewing 0.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,588 kB
  • ctags: 878
  • sloc: sh: 9,738; ansic: 7,644; makefile: 234; python: 49
file content (21 lines) | stat: -rwxr-xr-x 377 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
#!/bin/sh

abort() {
    echo $@
    exit 1
}

if [ ! -f materials.txt ]; then
    abort "Error! file materials.txt doesn't exist."
fi
if [ ! -f simulate ]; then
    echo "program 'simulate' not found.  Try to make"
    make >/dev/null 2>/dev/null
    if test "$?" != "0"; then
        abort "Error! Fail to build simulate"
    fi
fi

clear
# Simply invoke simulate
./simulate