summaryrefslogtreecommitdiff
path: root/src/transport/test_delay
blob: 5f82b65fb140d4be46078bc8ce8edd79902ea41d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

TEMP=$(getopt t: "$*")

if [ $? != 0 ] ; then
  exit 1
fi

eval set -- "$TEMP"

while true ; do
  case "$1" in
    (-t) sleep "$2" ; shift 2 ;;
    (--) shift ; break ;;
    (*) echo "Error parsing getopt output" ; exit 1 ;;
  esac
done
echo "exec $@"
exec "$@"