File: check_status

package info (click to toggle)
fai 3.1.8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,144 kB
  • ctags: 164
  • sloc: sh: 3,410; perl: 1,780; makefile: 113
file content (14 lines) | stat: -rw-r--r-- 240 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/sh

# check_status <command run> <its result status>

cmd=$1
st=$2

if [ $st -eq 0 ]; then
   res="OK."
else
   res="FAILED with exit code $st."
fi
# put result in the log file
printf "%-20s $res\n" $cmd | tee -a $LOGDIR/status.log