Date: Sat, 29 Jul 2006 13:15:55 GMT From: Gabor Kovesdan <gabor@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 102720 for review Message-ID: <200607291315.k6TDFtvo098155@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607291315.k6TDFtvo098155>