summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2012-12-19 19:40:31 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2012-12-19 19:40:31 +0000
commitacb0a240be37d315b0ef46200c71a79b3fdf4808 (patch)
treeea0149f95350bd495deda9b25bae40a9ff5af457 /usr.sbin/sysmerge
parent3115e4b7bdfd52732ad2fa75fc787b7b81a9508c (diff)
use (()) for arithmetic tests
ok @ajacoutot
Diffstat (limited to 'usr.sbin/sysmerge')
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index fd256ecd7da..961fb3f5a63 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.93 2012/11/10 18:48:28 rpe Exp $
+# $OpenBSD: sysmerge.sh,v 1.94 2012/12/19 19:40:30 rpe Exp $
#
# Copyright (c) 2008, 2009, 2010, 2011, 2012 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
@@ -77,7 +77,7 @@ error_rm_wrkdir() {
trap "restore_bak; clean_src; rm -rf ${WRKDIR}; exit 1" 1 2 3 13 15
-if [ "$(id -u)" -ne 0 ]; then
+if (($(id -u) != 0)); then
error "need root privileges to run this script"
usage
error_rm_wrkdir
@@ -370,7 +370,7 @@ diff_loop() {
else
chpass -la "${l}"
fi
- if [ $? -eq 0 ]; then
+ if (($? == 0)); then
set -A NEWUSR -- ${NEWUSR[@]} ${_u}
else
_merge_pwd=1
@@ -395,7 +395,7 @@ diff_loop() {
else
groupadd -g "${_gid}" "${_g}"
fi
- if [ $? -eq 0 ]; then
+ if (($? == 0)); then
set -A NEWGRP -- ${NEWGRP[@]} ${_g}
else
_merge_grp=1
@@ -676,7 +676,7 @@ while getopts bds:x: arg; do
done
shift $(( OPTIND -1 ))
-if [ $# -ne 0 ]; then
+if (($# != 0)); then
usage
error_rm_wrkdir
fi