ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

commit f41efa56b6dc1431d832379af7d2f89400cbb6b6
parent 4a77db4be7ad17d70be2f398595f991f2615e3f0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  4 Apr 2014 20:10:54 +0200

respawn: remove getopts

this also makes it compatible with busybox ash. -dN is not supported anymore however, but just use -d N.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mfs/bin/respawn | 17+++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/fs/bin/respawn b/fs/bin/respawn @@ -5,19 +5,16 @@ usage() { exit 1 } -delay=0 -while getopts ":d:" opt; do - case $opt in - d) - delay=$OPTARG +delay="0" +case "$1" in + -d) + delay="$2" + shift 2 ;; - \?|:) + -h) usage ;; - esac -done - -shift $((OPTIND-1)) +esac if test -z $1; then usage