summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_rolling-replace
diff options
context:
space:
mode:
authormcf <mcf@pkgsrc.org>2021-06-28 19:33:23 +0000
committermcf <mcf@pkgsrc.org>2021-06-28 19:33:23 +0000
commit660840f1db539e267be96224b4858b909bc080bf (patch)
tree6a29735df666916bfe7d08142537018f968fa7ee /pkgtools/pkg_rolling-replace
parenta86fc3ec4293b30523d930fd586c035beebb4af2 (diff)
downloadpkgsrc-660840f1db539e267be96224b4858b909bc080bf.tar.gz
pkg_rolling-replace: use POSIX getopts(1) instead of getopt(1)
Diffstat (limited to 'pkgtools/pkg_rolling-replace')
-rw-r--r--pkgtools/pkg_rolling-replace/Makefile4
-rwxr-xr-xpkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh40
2 files changed, 19 insertions, 25 deletions
diff --git a/pkgtools/pkg_rolling-replace/Makefile b/pkgtools/pkg_rolling-replace/Makefile
index 4d72ec44b23..c7586a43627 100644
--- a/pkgtools/pkg_rolling-replace/Makefile
+++ b/pkgtools/pkg_rolling-replace/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.49 2021/04/22 08:54:18 pho Exp $
+# $NetBSD: Makefile,v 1.50 2021/06/28 19:33:23 mcf Exp $
-PKGNAME= pkg_rolling-replace-0.24.12
+PKGNAME= pkg_rolling-replace-0.24.13
CATEGORIES= pkgtools
MAINTAINER= gdt@NetBSD.org
diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
index c1bbb6b32b2..359e75a939f 100755
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
+++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# $NetBSD: pkg_rolling-replace.sh,v 1.44 2021/04/22 08:54:18 pho Exp $
+# $NetBSD: pkg_rolling-replace.sh,v 1.45 2021/06/28 19:33:23 mcf Exp $
#<license>
# Copyright (c) 2006 BBN Technologies Corp. All rights reserved.
#
@@ -345,29 +345,23 @@ EXCLUDE=
MAKE_VAR="IN_PKG_ROLLING_REPLACE=1"
MAKE_VAR_SEP=" "
-args=$(getopt BFhknursvD:x:X:L: $*)
-if [ $? -ne 0 ]; then
- opt_h=1
-fi
-set -- $args
-while [ $# -gt 0 ]; do
- case "$1" in
- -B) opt_B=-B ;;
- -F) opt_F=1 ;;
- -h) opt_h=1 ;;
- -k) opt_k=1 ;;
- -n) opt_n=1 ;;
- -r) opt_r=1 ;;
- -s) opt_s=1 ;;
- -u) opt_u=1 ;;
- -v) opt_v=1 ;;
- -D) MAKE_VAR="${MAKE_VAR}${MAKE_VAR_SEP}$2"; MAKE_VAR_SEP=" "; shift ;;
- -x) EXCLUDE="$EXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
- -X) REALLYEXCLUDE="$REALLYEXCLUDE $(echo $2 | sed 's/,/ /g')" ; shift ;;
- -L) LOGPATH="$2"; shift ;;
- --) shift; break ;;
+while getopts BFhknursvD:x:X:L: opt; do
+ case "$opt" in
+ B) opt_B=-B ;;
+ F) opt_F=1 ;;
+ h) opt_h=1 ;;
+ k) opt_k=1 ;;
+ n) opt_n=1 ;;
+ r) opt_r=1 ;;
+ s) opt_s=1 ;;
+ u) opt_u=1 ;;
+ v) opt_v=1 ;;
+ D) MAKE_VAR="${MAKE_VAR}${MAKE_VAR_SEP}$OPTARG"; MAKE_VAR_SEP=" " ;;
+ x) EXCLUDE="$EXCLUDE $(echo $OPTARG | sed 's/,/ /g')" ;;
+ X) REALLYEXCLUDE="$REALLYEXCLUDE $(echo $OPTARG | sed 's/,/ /g')" ;;
+ L) LOGPATH="$OPTARG" ;;
+ ?) opt_h=1 ;;
esac
- shift
done
if [ -n "$opt_h" ]; then