From owner-p4-projects@FreeBSD.ORG Sat Jul 29 13:15:56 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 3FC3C16A4E1; Sat, 29 Jul 2006 13:15:56 +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 1830C16A4DF for ; Sat, 29 Jul 2006 13:15:56 +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 C83D943D53 for ; Sat, 29 Jul 2006 13:15:55 +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 k6TDFtDP098158 for ; Sat, 29 Jul 2006 13:15:55 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6TDFtvo098155 for perforce@freebsd.org; Sat, 29 Jul 2006 13:15:55 GMT (envelope-from gabor@FreeBSD.org) Date: Sat, 29 Jul 2006 13:15:55 GMT Message-Id: <200607291315.k6TDFtvo098155@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 102720 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 13:15:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=102720 Change 102720 by gabor@gabor_spitfire on 2006/07/29 13:15:39 ${SED}-ify make :S and :C substitutions. Affected files ... .. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#10 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#10 (text+ko) ==== @@ -11,7 +11,7 @@ ${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES." exit 1 fi - _MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} + _MASTER_SITES_${_group}+= `${ECHO_CMD} ${_S} | ${SED} "s/@^(.*/):[^/:]+$@\1@"` done else _MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} @@ -28,12 +28,12 @@ exit 1 fi if [ -n "${_MASTER_SITES_${_group}}" ] ; then - _MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} + _MASTER_SITE_SUBDIR_${_group}+= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*)/:[^/:]+$@\1@"` fi done else if [ -n "${_MASTER_SITES_DEFAULT}" ] ; then - _MASTER_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} + _MASTER_SITE_SUBDIR_DEFAULT+= `${ECHO_CMD} ${_S} | ${SED} "@^(.*)/:[^/:]+$@\1@"` fi fi done @@ -42,9 +42,9 @@ if [ -n "${_S_TEMP}" ] ; then for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do if [ -z "$${_MASTER_SITE_SUBDIR_${_group}}" ] ; then - MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} + MASTER_SITES_TMP= `${ECHO_CMD} $${_MASTER_SITES_${_group}} | ${SED} "s^%SUBDIR%/^^"` else - _S_TEMP_TEMP= ${_MASTER_SITES_${_group}:M*%SUBDIR%/*} + _S_TEMP_TEMP= $${_MASTER_SITES_${_group}:M*%SUBDIR%/*} if [ -z "${_S_TEMP_TEMP}" ] ; then MASTER_SITES_TMP= $${_MASTER_SITES_${_group}} else @@ -55,7 +55,7 @@ MASTER_SITES_TMP+= ${site} else for dir in $${_MASTER_SITE_SUBDIR_${_group}}; do - MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} + MASTER_SITES_TMP+= `${ECHO_CMD} ${site} | ${SED} "s^%SUBDIR%^\${dir}^"` done fi done @@ -77,22 +77,22 @@ MASTER_SITES_TMP+= ${site} else for dir in ${_MASTER_SITE_SUBDIR_DEFAULT}; do - MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} + MASTER_SITES_TMP+= `${ECHO_CMD} ${site} | ${SED} "s^%SUBDIR%^\${dir}^" done fi done fi else - MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT:S^%SUBDIR%/^^} + MASTER_SITES_TMP= `${ECHO_CMD} ${_MASTER_SITES_DEFAULT} | ${SED} "s^%SUBDIR%/^^"` fi -_MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} +_MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} MASTER_SITES_TMP= # The primary backup site. if [ -z "${MASTER_SITE_BACKUP}" ] ; then MASTER_SITE_BACKUP= ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ fi -MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^} +MASTER_SITE_BACKUP:= `${ECHO_CMD} ${MASTER_SITE_BACKUP} | ${SED} "s^\${DIST_SUBDIR}/^^"` # If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository # for everything, but don't search it twice by appending it to the end. @@ -134,11 +134,11 @@ _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} if [ -z "${_G_TEMP_TEMP}" ; then _G_TEMP+= ${_group} - _MASTER_SITES_ALL+= ${_MASTER_SITES_${_group}} + _MASTER_SITES_ALL+= $${_MASTER_SITES_${_group}} fi fi done - _DISTFILES+= ${_D:C/:[^:]+$//} + _DISTFILES+= `${ECHO_CMD} ${_D} | ${SED} "s/:[^:]+$//"` else _DISTFILES+= ${_D} fi @@ -150,7 +150,7 @@ # # Sort the master site list according to the patterns in MASTER_SORT # -MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|://[^/]*|:S|$|/|} +MASTER_SORT_REGEX+= `${ECHO_CMD} ${MASTER_SORT} | ${SED} -e "s|.|\\.|g" -e "s|^|://[^/]*|" -e "s|$|/|"` MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S|\\|\\\\|g}"; } .for srt in ${MASTER_SORT_REGEX} MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; } @@ -254,10 +254,10 @@ ${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" exit 1 fi - _PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} + _PATCH_SITES_${_group}+= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*/):[^/:]+$@\1@"` done else - _PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} + _PATCH_SITES_DEFAULT+= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*/):[^/:]+$@\1@"` fi done for _S in ${PATCH_SITE_SUBDIR}; do @@ -271,12 +271,12 @@ exit 1 fi if [ -n "${_PATCH_SITES_${_group}}" ] ; then - _PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} + _PATCH_SITE_SUBDIR_${_group}+= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*)/:[^/:]+$@\1@"` fi done else if [ -n "${_PATCH_SITES_DEFAULT}" ] ; then - _PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} + _PATCH_SITE_SUBDIR_DEFAULT+= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*)/:[^/:]+$@\1@"` fi fi done @@ -296,7 +296,7 @@ PATCH_SITES_TMP+= ${site} else for dir in $${_PATCH_SITE_SUBDIR_${_group}}; do - PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} + PATCH_SITES_TMP+= `${ECHO_CMD} ${site} | ${SED} "s^%SUBDIR%^\${dir}^"` dine fi done @@ -318,13 +318,13 @@ PATCH_SITES_TMP+= ${site} else for dir in ${_PATCH_SITE_SUBDIR_DEFAULT}; do - PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} + PATCH_SITES_TMP+= `${ECHO_CMD} ${site} | ${SED} "s^%SUBDIR%^\${dir}^"` done fi done fi else - PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} + PATCH_SITES_TMP= `${ECHO_CMD} ${_PATCH_SITES_DEFAULT} | ${SED} "s^%SUBDIR%/^^"` fi _PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} PATCH_SITES_TMP= @@ -333,7 +333,7 @@ for _P in ${PATCHFILES}; do _P_TEMP= ${_P:S/^${_P:C/:[^:]+$//}//} if [ -n "${_P_TEMP}" ] ; then - for _group in ${_P_TEMP:S/^://:S/,/ /g}; do + for _group in `${ECHO_CMD} ${_P_TEMP} | ${SED} -e "s/^://" -e "s/,/ /g"`; do if [ -z "$${_PATCH_SITES_${_group}}" ] ; then _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} if [ -z "${_G_TEMP_TEMP}" ] ; then @@ -342,7 +342,7 @@ fi fi done - _PATCHFILES+= ${_P:C/:[^:]+$//} + _PATCHFILES+= `${ECHO_CMD} ${_P} | ${SED} "s/:[^:]+$//"` else _PATCHFILES+= ${_P} fi