#!/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 "$@"
