File: run-sman.sh

package info (click to toggle)
axiom 20170501-4
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,048,504 kB
  • sloc: lisp: 3,600; makefile: 505; cpp: 223; ansic: 138; sh: 96
file content (19 lines) | stat: -rw-r--r-- 456 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
runsman () {

    [ "$DISPLAY" != "" ] && echo $@ | awk '{for (k=j=i=1;i<=NF;i++) {
                if ($i=="-noht")j=0;
                if ($i=="-ht")j=1;
                if ($i=="-nogr")k=0;
                if ($i=="-gr")k=1;
                if ($i=="-nox"){j=0;k=0;}
                }
                if (j==1 || k==1) exit 0; else exit 1;}'

}

if runsman $otheropts ; then 
    exec $SPAD/bin/sman $otheropts -ws $serverws
else
    exec $serverws
fi