From owner-p4-projects@FreeBSD.ORG Sat Jul 29 14:11:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 797C316A4ED; Sat, 29 Jul 2006 14:11:05 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 511C116A4E7 for ; Sat, 29 Jul 2006 14:11:05 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5E6743D4C for ; Sat, 29 Jul 2006 14:11:04 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6TEB4jZ002033 for ; Sat, 29 Jul 2006 14:11:04 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6TEB4mC002030 for perforce@freebsd.org; Sat, 29 Jul 2006 14:11:04 GMT (envelope-from gabor@FreeBSD.org) Date: Sat, 29 Jul 2006 14:11:04 GMT Message-Id: <200607291411.k6TEB4mC002030@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 102722 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2006 14:11:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=102722 Change 102722 by gabor@gabor_spitfire on 2006/07/29 14:10:55 Use brackets {} around variables when referencing to them as suggested by sh(1). Affected files ... .. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#12 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#12 (text+ko) ==== @@ -177,34 +177,34 @@ done for _file in ${DISTFILES}; do - file= `${ECHO_CMD} $_file | ${SED} -E -e 's/:[^:]+$//'` + file= `${ECHO_CMD} ${_file} | ${SED} -E -e 's/:[^:]+$//'` select= `${ECHO_CMD} ${_file#${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` force_fetch= false - filebasename= `${BASENAME} $file` + filebasename= `${BASENAME} ${file}` for afile in ${FORCE_FETCH}; do - afile=`${BASENAME} $afile` - if [ "x$afile" = "x$filebasename" ]; then + afile=`${BASENAME} ${afile}` + if [ "x${afile}" = "x${filebasename}" ]; then force_fetch= true fi done - if [ ! -f $file -a ! -f $filebasename -o "$force_fetch" = "true" ]; then + if [ ! -f ${file} -a ! -f ${filebasename} -o "${force_fetch}" = "true" ]; then DIR= ${DIST_SUBDIR} - pattern= "${DIR:+$DIR/}`${ECHO_CMD} $file | ${SED} -e 's/\./\\\\./g'`" - if [ -L $file -o -L $filebasename ]; then - ${ECHO_MSG} "=> ${_DISTDIR}/$file is a broken symlink." + pattern= "${DIR:+$DIR/}`${ECHO_CMD} ${file} | ${SED} -e 's/\./\\\\./g'`" + if [ -L ${file} -o -L ${filebasename} ]; then + ${ECHO_MSG} "=> ${_DISTDIR}/${file} is a broken symlink." ${ECHO_MSG} "=> Perhaps a filesystem (most likely a CD) isn't mounted?" ${ECHO_MSG} "=> Please correct this problem and try again." exit 1 fi if [ -f ${MD5_FILE} -a "x${NO_CHECKSUM}" = "x" ]; then if ! ${GREP} -q "^MD5 ($pattern)" ${MD5_FILE}; then - ${ECHO_MSG} "=> ${DIR:+$DIR/}$file is not in ${MD5_FILE}." + ${ECHO_MSG} "=> ${DIR:+$DIR/}${file} is not in ${MD5_FILE}." ${ECHO_MSG} "=> Either ${MD5_FILE} is out of date, or" - ${ECHO_MSG} "=> ${DIR:+$DIR/}$file is spelled incorrectly." + ${ECHO_MSG} "=> ${DIR:+$DIR/}${file} is spelled incorrectly." exit 1 fi fi - ${ECHO_MSG} "=> $file doesn't seem to exist in ${_DISTDIR}." + ${ECHO_MSG} "=> ${file} doesn't seem to exist in ${_DISTDIR}." if [ ! -w ${DISTDIR} ]; then ${ECHO_MSG} "=> ${DISTDIR} is not writable by you; cannot fetch." exit 1 @@ -225,7 +225,7 @@ for site in `eval $SORTED_MASTER_SITES_CMD_TMP ${_RANDOMIZE_SITES}`; do ${ECHO_MSG} "=> Attempting to fetch from ${site}." DIR= ${DIST_SUBDIR} - CKSIZE= `${GREP} "^SIZE (${DIR:+$DIR/}$file)" ${MD5_FILE} | ${AWK} '{print $4}'` + CKSIZE= `${GREP} "^SIZE (${DIR:+$DIR/}${file})" ${MD5_FILE} | ${AWK} '{print $4}'` case ${file} in */*) ${MKDIR} ${file%/*}; \ @@ -359,19 +359,19 @@ cd ${_DISTDIR} for _file in ${PATCHFILES}; do - file= `${ECHO_CMD} $_file | ${SED} -E -e 's/:[^:]+$$//'` + file= `${ECHO_CMD} ${_file} | ${SED} -E -e 's/:[^:]+$$//'` select= `${ECHO_CMD} ${_file#${file}} | ${SED} -e 's/^://' -e 's/,/ /g'` force_fetch= false - filebasename= `${BASENAME} $file` + filebasename= `${BASENAME} ${file}` for afile in ${FORCE_FETCH}; do - afile= `${BASENAME} $afile` - if [ "x$afile" = "x$filebasename" ]; then - force_fetch =true + afile= `${BASENAME} ${afile}` + if [ "x${afile}" = "x${filebasename}" ]; then + force_fetch= true fi done - if [ ! -f $file -a ! -f $filebasename -o "$force_fetch" = "true" ]; then - if [ -L $file -o -L `${BASENAME} $file` ]; then - ${ECHO_MSG} "=> ${_DISTDIR}/$file is a broken symlink." + if [ ! -f ${file} -a ! -f ${filebasename} -o "${force_fetch}" = "true" ]; then + if [ -L ${file} -o -L `${BASENAME} ${file}` ]; then + ${ECHO_MSG} "=> ${_DISTDIR}/${file} is a broken symlink." ${ECHO_MSG} "=> Perhaps a filesystem (most likely a CD) isn't mounted?" ${ECHO_MSG} "=> Please correct this problem and try again." exit 1 @@ -379,7 +379,7 @@ ${ECHO_MSG} "=> $file doesn't seem to exist in ${_DISTDIR}." if [ ! -z "${select}" ] ; then __PATCH_SITES_TMP= - for group in $select; do + for group in ${select}; do if [ ! -z $${_PATCH_SITES_${group}} ] ; then eval ___PATCH_SITES_TMP= "$${_PATCH_SITES_${group}}" __PATCH_SITES_TMP= "${__PATCH_SITES_TMP} ${___PATCH_SITES_TMP}" @@ -393,8 +393,8 @@ for site in `eval $SORTED_PATCH_SITES_CMD_TMP`; do ${ECHO_MSG} "=> Attempting to fetch from ${site}." DIR= ${DIST_SUBDIR} - pattern= "${DIR:+$DIR/}`${ECHO_CMD} $file | ${SED} -e 's/\./\\\\./g'`" - CKSIZE= `${GREP} "^SIZE ($pattern)" ${MD5_FILE} | ${AWK} '{print $4}'` + pattern= "${DIR:+$DIR/}`${ECHO_CMD} ${file} | ${SED} -e 's/\./\\\\./g'`" + CKSIZE= `${GREP} "^SIZE (${pattern})" ${MD5_FILE} | ${AWK} '{print $4}'` case ${file} in */*) ${MKDIR} ${file%/*}; \