PERFORCE change 103107 for review
Gabor Kovesdan
gabor at FreeBSD.org
Thu Aug 3 09:39:11 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103107
Change 103107 by gabor at gabor_spitfire on 2006/08/03 09:38:57
- Use single quotes around sed patterns where no shell substitution
should be done
- Add some missing `
Affected files ...
.. //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#18 edit
Differences ...
==== //depot/projects/soc2006/gabor_ports/Tools/scripts/do-fetch.sh#18 (text+ko) ====
@@ -2,29 +2,29 @@
cd ${_DISTDIR}
for _S in ${MASTER_SITES}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e "/^://"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s|^${__TMP}||" -e '/^://'`
if [ -n "${_S_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do
_G_TEMP= ${_group}
if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then
${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES."
exit 1
fi
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s/@^(.*/):[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's/@^(.*/):[^/:]+$@\1@'`
_MASTER_SITES_${_group}= $${_MASTER_SITES_${_group}} ${__SUFFIX_TMP}
done
else
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*/):[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*/):[^/:]+$@\1@'`
_MASTER_SITES_DEFAULT= ${_MASTER_SITES_DEFAULT} ${__SUFFIX_TMP}
fi
done
for _S in ${MASTER_SITE_SUBDIR}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e "s/^://"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e 's/^://'`
if [ -n "${_S_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do
_G_TEMP= ${_group}
if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then
${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
@@ -32,24 +32,24 @@
exit 1
fi
if [ -n "$${_MASTER_SITES_${_group}}" ] ; then
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*)/:[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*)/:[^/:]+$@\1@'`
_MASTER_SITE_SUBDIR_${_group}= $${_MASTER_SITE_SUBDIR_${_group}} ${__SUFFIX_TMP}
fi
done
else
if [ -n "${_MASTER_SITES_DEFAULT}" ] ; then
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "@^(.*)/:[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} '@^(.*)/:[^/:]+$@\1@'`
_MASTER_SITE_SUBDIR_DEFAULT= ${_MASTER_SITE_SUBDIR_DEFAULT} ${__SUFFIX_TMP}
fi
fi
done
for _S in ${MASTER_SITES}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" "s/^://"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" 's/^://'`
if [ -n "${_S_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do
if [ -z "$${_MASTER_SITE_SUBDIR_${_group}}" ] ; then
- MASTER_SITES_TMP= `${ECHO_CMD} $${_MASTER_SITES_${_group}} | ${SED} "s^%SUBDIR%/^^"`
+ MASTER_SITES_TMP= `${ECHO_CMD} $${_MASTER_SITES_${_group}} | ${SED} 's^%SUBDIR%/^^'`
else
_S_TEMP_TEMP= `${ECHO_CMD} $${_MASTER_SITES_${_group}} | ${TR} ' ' '\n' | ${GREP} *%SUBDIR%/*`
if [ -z "${_S_TEMP_TEMP}" ] ; then
@@ -92,7 +92,7 @@
done
fi
else
- MASTER_SITES_TMP= `${ECHO_CMD} ${_MASTER_SITES_DEFAULT} | ${SED} "s^%SUBDIR%/^^"`
+ MASTER_SITES_TMP= `${ECHO_CMD} ${_MASTER_SITES_DEFAULT} | ${SED} 's^%SUBDIR%/^^'`
fi
_MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP}
MASTER_SITES_TMP=
@@ -136,11 +136,11 @@
_MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT}
_G_TEMP= DEFAULT
for _D in ${DISTFILES}; do
- __TMP= `${ECHO_CMD} ${_D} | ${SED} "s/:[^:]+$//"
- _D_TEMP= `${ECHO_CMD} ${_D} | ${SED} "s/^${__TMP}//"
+ __TMP= `${ECHO_CMD} ${_D} | ${SED} 's/:[^:]+$//'`
+ _D_TEMP= `${ECHO_CMD} ${_D} | ${SED} "s/^${__TMP}//"`
if [ -n "${_D_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e "s/^://" -e "s/,/ /g"`; do
- if [ -z "$$}_MASTER_SITES_${_group}}" ] ; then
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e 's/^://' -e 's/,/ /g'`; do
+ if [ -z "$${_MASTER_SITES_${_group}}" ] ; then
_G_TEMP_TEMP= `${ECHO_CMD} ${_G_TEMP} | ${TR} ' ' '\n' | ${GREP} /${_group}/`
if [ -z "${_G_TEMP_TEMP}" ; then
_G_TEMP= ${_G_TEMP} ${_group}
@@ -148,7 +148,7 @@
fi
fi
done
- __SUFFIX_TMP= `${ECHO_CMD} ${_D} | ${SED} "s/:[^:]+$//"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_D} | ${SED} 's/:[^:]+$//'`
_DISTFILES= ${_DISTFILE} ${__SUFFIX_TMP}
else
_DISTFILES= ${_DISTFILES} ${_D}
@@ -161,7 +161,7 @@
#
# Sort the master site list according to the patterns in MASTER_SORT
#
-MASTER_SORT_REGEX+= `${ECHO_CMD} ${MASTER_SORT} | ${SED} -e "s|.|\\.|g" -e "s|^|://[^/]*|" -e "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; }
@@ -178,12 +178,12 @@
#
# for use in the fetch targets
for _S in ${MASTER_SITES}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} "s/^${__TMP}//"
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} "s/^${__TMP}//"`
if [ -n "${_S_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e "s/^://" -e "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e 's/^://' -e 's/,/ /g'`; do
SORTED_MASTER_SITES_${_group}_CMD= cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} master-sites--${_group}
- ${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_MASTER_SITES_${_group}}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
+ ${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} $${_MASTER_SITES_${_group}} | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
done
fi
done
@@ -257,29 +257,29 @@
if [ -z "${PATCHFILES}" ] ; then
for _S in ${PATCH_SITES}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e "s/^://"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e 's/^://'`
if [ -n "${_S_TEMP}" ; then \
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do
_G_TEMP= ${_group}
if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then
${ECHO_MSG} "The words all, ALL and default are reserved and cannot be"
${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES"
exit 1
fi
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*/):[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*/):[^/:]+$@\1@'`
_PATCH_SITES_${_group}= $${_PATCH_SITES_${_group}} ${__SUFFIX_TMP}
done
else
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*/):[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*/):[^/:]+$@\1@'`
_PATCH_SITES_DEFAULT= ${_PATCH_SITES_DEFAULT} ${__SUFFIX_TMP}
fi
done
for _S in ${PATCH_SITE_SUBDIR}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e "s/^://"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e 's/^://'`
if [ -n "${_S_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do
_G_TEMP= ${_group}
if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default; then
${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be"
@@ -287,22 +287,22 @@
exit 1
fi
if [ -n "${_PATCH_SITES_${_group}}" ] ; then
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*)/:[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*)/:[^/:]+$@\1@'`
_PATCH_SITE_SUBDIR_${_group}= $${_PATCH_SITE_SUBDIR_${_group}} ${__SUFFIX_TMP}
fi
done
else
if [ -n "${_PATCH_SITES_DEFAULT}" ] ; then
- __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} "s@^(.*)/:[^/:]+$@\1@"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_S} | ${SED} 's@^(.*)/:[^/:]+$@\1@'`
_PATCH_SITE_SUBDIR_DEFAULT= ${_PATCH_SITE_SUBDIR_DEFAULT} ${__SUFFIX_TMP}
fi
fi
done
for _S in ${PATCH_SITES}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
- _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e "s/^://"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
+ _S_TEMP= `${ECHO_CMD} ${_S} | ${SED} -e "s/^${__TMP}//" -e 's/^://'`
if [ -n "${_S_TEMP}" } ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} 's/,/ /g'`; do
if [ -z "$${_PATCH_SITE_SUBDIR_${_group}}" ] ; then
_S_TEMP_TEMP= `${ECHO_CMD} ${_PATCH_SITES_${_group}} | ${TR} ' ' '\n' | ${GREP} *%SUBDIR%/*`
if [ -z "${_S_TEMP_TEMP}" ] ; then
@@ -345,17 +345,17 @@
done
fi
else
- PATCH_SITES_TMP= `${ECHO_CMD} ${_PATCH_SITES_DEFAULT} | ${SED} "s^%SUBDIR%/^^"`
+ PATCH_SITES_TMP= `${ECHO_CMD} ${_PATCH_SITES_DEFAULT} | ${SED} 's^%SUBDIR%/^^'`
fi
_PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP}
PATCH_SITES_TMP=
_PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT}
_G_TEMP= DEFAULT
for _P in ${PATCHFILES}; do
- __TMP= `${ECHO_CMD} ${_P} | ${SED} "s/:[^:]+$//"`
+ __TMP= `${ECHO_CMD} ${_P} | ${SED} 's/:[^:]+$//'`
_P_TEMP= `${ECHO_CMD} ${_P} | ${SED} "s/^${__TMP}//"
if [ -n "${_P_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_P_TEMP} | ${SED} -e "s/^://" -e "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= `${ECHO_CMD} ${_G_TEMP} | ${TR} ' ' '\n' | ${GREP} /${_group}/`
if [ -z "${_G_TEMP_TEMP}" ] ; then
@@ -364,17 +364,17 @@
fi
fi
done
- __SUFFIX_TMP= `${ECHO_CMD} ${_P} | ${SED} "s/:[^:]+$//"`
+ __SUFFIX_TMP= `${ECHO_CMD} ${_P} | ${SED} 's/:[^:]+$//'`
_PATCHFILES= ${_PATCHFILES} ${__SUFFIX_TMP}
else
_PATCHFILES= ${_PATCHFILES} ${_P}
fi
done
for _S in ${PATCH_SITES}; do
- __TMP= `${ECHO_CMD} ${_S} | ${SED} "s@/:[^/:]+$@/@"`
+ __TMP= `${ECHO_CMD} ${_S} | ${SED} 's@/:[^/:]+$@/@'`
_S_TEMP= `${ECHO_CMD} ${_S} | ${SED} "s/^${__TMP}//"`
if [ -n "${_S_TEMP}" ] ; then
- for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e "s/^://" "s/,/ /g"`; do
+ for _group in `${ECHO_CMD} ${_S_TEMP} | ${SED} -e 's/^://' 's/,/ /g'`; do
SORTED_PATCH_SITES_${_group}_CMD= cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} patch-sites-${_group}
${ECHO_CMD} ${_MASTER_SITE_OVERRIDE} `${ECHO_CMD} '${_PATCH_SITES_${_group}}' | ${AWK} '${MASTER_SORT_AWK:S|\\|\\\\|g}'` ${_MASTER_SITE_BACKUP}
done
More information about the p4-projects
mailing list