diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2012-12-23 11:50:20 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2012-12-23 11:50:20 +0000 |
commit | 385adeaba7f23ec8bf86636c98aa15245cc09a74 (patch) | |
tree | 4781b33d4782b2f3774a8fcf7592cbb0dae83706 | |
parent | 0417565a779a879935d3f6845d28ede2c07cd455 (diff) |
simplify setting FETCH_CMD and move it upwards to where the other
global variables are defined
ok ajacoutot@
-rw-r--r-- | usr.sbin/sysmerge/sysmerge.sh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh index 961fb3f5a63..9070a70cf2e 100644 --- a/usr.sbin/sysmerge/sysmerge.sh +++ b/usr.sbin/sysmerge/sysmerge.sh @@ -1,6 +1,6 @@ #!/bin/ksh - # -# $OpenBSD: sysmerge.sh,v 1.94 2012/12/19 19:40:30 rpe Exp $ +# $OpenBSD: sysmerge.sh,v 1.95 2012/12/23 11:50:19 rpe Exp $ # # Copyright (c) 2008, 2009, 2010, 2011, 2012 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org> @@ -27,6 +27,7 @@ unset XTGZ XTGZURL WRKDIR=$(mktemp -d -p ${TMPDIR:=/var/tmp} sysmerge.XXXXXXXXXX) || exit 1 SWIDTH=$(stty size | awk '{w=$2} END {if (w==0) {w=80} print w}') MERGE_CMD="${MERGE_CMD:=sdiff -as -w ${SWIDTH} -o}" +FETCH_CMD="${FETCH_CMD:=/usr/bin/ftp -V -m -k ${FTP_KEEPALIVE:-0}}" REPORT="${REPORT:=${WRKDIR}/sysmerge.log}" DBDIR="${DBDIR:=/var/db/sysmerge}" @@ -83,11 +84,6 @@ if (($(id -u) != 0)); then error_rm_wrkdir fi -if [ -z "${FETCH_CMD}" ]; then - [ -z "${FTP_KEEPALIVE}" ] && FTP_KEEPALIVE=0 - FETCH_CMD="/usr/bin/ftp -V -m -k ${FTP_KEEPALIVE}" -fi - do_populate() { local cf i _array _d _r _D _E _R _X CF_DIFF CF_FILES CURSUM IGNORE_FILES mkdir -p ${DESTDIR}/${DBDIR} || error_rm_wrkdir |