summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSimon Stelling <blubb@gentoo.org>2006-04-15 18:42:28 +0000
committerSimon Stelling <blubb@gentoo.org>2006-04-15 18:42:28 +0000
commitd68ec90157a963f3483c09915b1844ee43b4ac77 (patch)
tree6553f68fc4267b99784f10fb2fe03a3454505eef /bin
parent1b7e9bacc284926b12a4d64a288d373de8b1708f (diff)
downloadportage-d68ec90157a963f3483c09915b1844ee43b4ac77.tar.gz
portage-d68ec90157a963f3483c09915b1844ee43b4ac77.tar.bz2
portage-d68ec90157a963f3483c09915b1844ee43b4ac77.zip
`` must die
svn path=/main/trunk/; revision=3155
Diffstat (limited to 'bin')
-rwxr-xr-xbin/doexe2
-rwxr-xr-xbin/dojar2
-rwxr-xr-xbin/ebuild.sh48
-rwxr-xr-xbin/etc-update44
-rwxr-xr-xbin/find-requires8
-rw-r--r--bin/isolated-functions.sh2
-rw-r--r--bin/misc-functions.sh4
-rwxr-xr-xbin/prepalldocs4
-rwxr-xr-xbin/prepinfo4
-rwxr-xr-xbin/quickpkg2
10 files changed, 60 insertions, 60 deletions
diff --git a/bin/doexe b/bin/doexe
index aa87f787e..949527768 100755
--- a/bin/doexe
+++ b/bin/doexe
@@ -15,7 +15,7 @@ fi
for x in "$@" ; do
if [ -L "${x}" ] ; then
cp "${x}" "${T}"
- mysrc="${T}"/`/usr/bin/basename "${x}"`
+ mysrc="${T}"/$(/usr/bin/basename "${x}")
elif [ -d "${x}" ] ; then
echo "doexe: warning, skipping directory ${x}"
continue
diff --git a/bin/dojar b/bin/dojar
index 8ed9285bb..e61015ef6 100755
--- a/bin/dojar
+++ b/bin/dojar
@@ -40,7 +40,7 @@ for i in $* ; do
bn="$(basename $i)"
if [ -f "$pf" ] ; then
- oldcp=`grep "CLASSPATH=" "$pf" | sed "s/CLASSPATH=//"`
+ oldcp=$(grep "CLASSPATH=" "$pf" | sed "s/CLASSPATH=//")
grep -v "CLASSPATH=" "$pf" > "${pf}.new"
echo "CLASSPATH=${oldcp}:${jardest}${bn}" >> "${pf}.new"
mv "${pf}.new" "$pf"
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 814d9da58..82699119c 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -579,7 +579,7 @@ pkg_nofetch() {
echo "!!! The following are listed in SRC_URI for ${PN}:"
local x
- for x in `echo ${SRC_URI}`; do
+ for x in $(echo ${SRC_URI}); do
echo "!!! ${x}"
done
}
@@ -1407,7 +1407,7 @@ QA_INTERCEPTORS="javac java-config python python-config perl grep egrep fgrep se
# level the QA interceptors if we're in depend
if hasq "depend" "$@"; then
for BIN in ${QA_INTERCEPTORS}; do
- BIN_PATH=`type -pf ${BIN}`
+ BIN_PATH=$(type -pf ${BIN})
if [ "$?" != "0" ]; then
BODY="echo \"*** missing command: ${BIN}\" >&2; return 127"
else
@@ -1561,29 +1561,29 @@ for myarg in $*; do
# Make it group writable. 666&~002==664
umask 002
- #the extra `echo` commands remove newlines
- echo `echo "$DEPEND"` > $dbkey
- echo `echo "$RDEPEND"` >> $dbkey
- echo `echo "$SLOT"` >> $dbkey
- echo `echo "$SRC_URI"` >> $dbkey
- echo `echo "$RESTRICT"` >> $dbkey
- echo `echo "$HOMEPAGE"` >> $dbkey
- echo `echo "$LICENSE"` >> $dbkey
- echo `echo "$DESCRIPTION"` >> $dbkey
- echo `echo "$KEYWORDS"` >> $dbkey
- echo `echo "$INHERITED"` >> $dbkey
- echo `echo "$IUSE"` >> $dbkey
+ #the extra $(echo) commands remove newlines
+ echo $(echo "$DEPEND") > $dbkey
+ echo $(echo "$RDEPEND") >> $dbkey
+ echo $(echo "$SLOT") >> $dbkey
+ echo $(echo "$SRC_URI") >> $dbkey
+ echo $(echo "$RESTRICT") >> $dbkey
+ echo $(echo "$HOMEPAGE") >> $dbkey
+ echo $(echo "$LICENSE") >> $dbkey
+ echo $(echo "$DESCRIPTION") >> $dbkey
+ echo $(echo "$KEYWORDS") >> $dbkey
+ echo $(echo "$INHERITED") >> $dbkey
+ echo $(echo "$IUSE") >> $dbkey
echo >> $dbkey
- echo `echo "$PDEPEND"` >> $dbkey
- echo `echo "$PROVIDE"` >> $dbkey
- echo `echo "${EAPI:-0}"` >> $dbkey
- echo `echo "$UNUSED_01"` >> $dbkey
- echo `echo "$UNUSED_02"` >> $dbkey
- echo `echo "$UNUSED_03"` >> $dbkey
- echo `echo "$UNUSED_04"` >> $dbkey
- echo `echo "$UNUSED_05"` >> $dbkey
- echo `echo "$UNUSED_06"` >> $dbkey
- echo `echo "$UNUSED_07"` >> $dbkey
+ echo $(echo "$PDEPEND") >> $dbkey
+ echo $(echo "$PROVIDE") >> $dbkey
+ echo $(echo "${EAPI:-0}") >> $dbkey
+ echo $(echo "$UNUSED_01") >> $dbkey
+ echo $(echo "$UNUSED_02") >> $dbkey
+ echo $(echo "$UNUSED_03") >> $dbkey
+ echo $(echo "$UNUSED_04") >> $dbkey
+ echo $(echo "$UNUSED_05") >> $dbkey
+ echo $(echo "$UNUSED_06") >> $dbkey
+ echo $(echo "$UNUSED_07") >> $dbkey
set +f
#make sure it is writable by our group:
exit 0
diff --git a/bin/etc-update b/bin/etc-update
index a8bf13325..2600ed813 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -44,11 +44,11 @@ function scan() {
[ ! -d ${path} ] && continue
ofile=""
- for file in `find ${path}/ -iname '._cfg????_*' ! -name '.*~' ! -name '.*.bak' |
+ for file in $(find ${path}/ -iname '._cfg????_*' ! -name '.*~' ! -name '.*.bak' |
sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
- sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'`; do
- rpath=`echo "${file/\/\///}" | sed -e "s:/[^/]*$::"`
- rfile=`echo "${file/\/\///}" | sed -e "s:^.*/::"`
+ sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
+ rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::")
+ rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::")
for mpath in ${CONFIG_PROTECT_MASK}; do
if [[ "${rpath}" == "${mpath}"* ]]; then
mv ${rpath}/${rfile} ${rpath}/${rfile:10}
@@ -68,8 +68,8 @@ function scan() {
diff -Bbua ${rpath}/${rfile} ${rpath}/${rfile:10} | egrep '^[+-]' | egrep -v '^[+-][\t ]*#|^--- |^\+\+\+ ' | egrep -qv '^[-+][\t ]*$'
MATCHES=$?
fi
- elif [[ -z `diff -Nua ${rpath}/${rfile} ${rpath}/${rfile:10}|
- grep "^[+-][^+-]"|grep -v '# .Header:.*'` ]]; then
+ elif [[ -z $(diff -Nua ${rpath}/${rfile} ${rpath}/${rfile:10}|
+ grep "^[+-][^+-]"|grep -v '# .Header:.*') ]]; then
MATCHES=1
fi
if [[ "${MATCHES}" == "1" ]]; then
@@ -86,8 +86,8 @@ function scan() {
fi
fi
- if [[ -z `diff -Nua ${rpath}/${rfile} ${rpath}/${ofile}|
- grep "^[+-][^+-]"|grep -v '# .Header:.*'` ]]; then
+ if [[ -z $(diff -Nua ${rpath}/${rfile} ${rpath}/${ofile}|
+ grep "^[+-][^+-]"|grep -v '# .Header:.*') ]]; then
mv ${rpath}/${rfile} ${rpath}/${ofile}
continue
else
@@ -192,7 +192,7 @@ function do_file() {
read my_input
else
dialog --title "${title}" --menu "${my_title}" \
- 0 0 0 `echo -e "$(<${TMP}/menuitems)\n${fcount} Exit"` \
+ 0 0 0 $(echo -e "$(<${TMP}/menuitems)\n${fcount} Exit") \
2> ${TMP}/input || die "User termination!" 0
my_input=$(<${TMP}/input)
fi
@@ -307,10 +307,10 @@ function do_merge() {
until (( ${my_input} == -1 )); do
echo "Merging ${file} and ${ofile}"
- `echo "${merge_command}" |
+ $(echo "${merge_command}" |
sed -e "s:%merged:${mfile}:g" \
-e "s:%orig:${ofile}:g" \
- -e "s:%new:${file}:g"`
+ -e "s:%new:${file}:g")
until (( ${my_input} == -1 )); do
echo -n "1) Replace ${ofile} with merged file
2) Show differences between merged file and original
@@ -327,9 +327,9 @@ Please select from the menu above (-1 to exit, losing this merge): "
return 255
;;
2) ( echo "Showing differences between ${ofile} and ${mfile}"
- `echo "${diff_command}" | \
+ $(echo "${diff_command}" | \
sed -e "s:%file1:${ofile}:" \
- -e "s:%file2:${mfile}:"` ) | ${pager}
+ -e "s:%file2:${mfile}:") ) | ${pager}
continue
;;
3) break
@@ -375,15 +375,15 @@ CONFIG_PROTECT=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT)
CONFIG_PROTECT_MASK=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT_MASK)
# load etc-config's configuration
-EU_AUTOMERGE=`get_config eu_automerge`
-rm_opts=`get_config rm_opts`
-mv_opts=`get_config mv_opts`
-cp_opts=`get_config cp_opts`
-pager=`get_config pager`
-diff_command=`get_config diff_command`
-using_editor=`get_config using_editor`
-merge_command=`get_config merge_command`
-declare -i mode=`get_config mode`
+EU_AUTOMERGE=$(get_config eu_automerge)
+rm_opts=$(get_config rm_opts)
+mv_opts=$(get_config mv_opts)
+cp_opts=$(get_config cp_opts)
+pager=$(get_config pager)
+diff_command=$(get_config diff_command)
+using_editor=$(get_config using_editor)
+merge_command=$(get_config merge_command)
+declare -i mode=$(get_config mode)
[ -z ${mode} ] && mode=0
[ -z "${pager}" ] && pager="cat"
diff --git a/bin/find-requires b/bin/find-requires
index efd356e2e..82959b748 100755
--- a/bin/find-requires
+++ b/bin/find-requires
@@ -8,10 +8,10 @@
ulimit -c 0
-filelist=`sed "s/['\"]/\\\&/g"`
-exelist=`echo $filelist | $XARGS file | grep ":.*executable" | cut -d: -f1 `
-scriptlist=`echo $filelist | $XARGS file | egrep ":.* (commands|script) " | cut -d: -f1 `
-liblist=`echo $filelist | $XARGS file | grep ":.*shared object" | cut -d : -f1 `
+filelist=$(sed "s/['\"]/\\\&/g")
+exelist=$(echo $filelist | $XARGS file | grep ":.*executable" | cut -d: -f1 )
+scriptlist=$(echo $filelist | $XARGS file | egrep ":.* (commands|script) " | cut -d: -f1 )
+liblist=$(echo $filelist | $XARGS file | grep ":.*shared object" | cut -d : -f1 )
for f in $exelist; do
if [ -x $f ]; then
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index c257a10d5..3a004a15f 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -187,7 +187,7 @@ unset_colors() {
set_colors() {
COLS=${COLUMNS:-0} # bash's internal COLUMNS variable
- (( COLS == 0 )) && COLS=$(set -- `stty size 2>/dev/null` ; echo $2)
+ (( COLS == 0 )) && COLS=$(set -- $(stty size 2>/dev/null) ; echo $2)
(( COLS > 0 )) || (( COLS = 80 ))
COLS=$((${COLS} - 8)) # width of [ ok ] == 7
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 90306d565..67d6bdcc4 100644
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -298,7 +298,7 @@ preinst_suid_scan() {
echo ">>> Preforming suid scan in ${IMAGE}"
for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); do
if [ -s "${sfconf}" ]; then
- suid="`grep ^${i/${IMAGE}/}$ ${sfconf}`"
+ suid="$(grep ^${i/${IMAGE}/}$ ${sfconf})"
if [ "${suid}" = "${i/${IMAGE}/}" ]; then
echo "- ${i/${IMAGE}/} is an approved suid file"
else
@@ -312,7 +312,7 @@ preinst_suid_scan() {
# can easly be bypassed using the addwrite() function
addwrite "${sfconf}"
echo ">>> Appending commented out entry to ${sfconf} for ${PF}"
- ls_ret=`ls -ldh "${i}"`
+ ls_ret=$(ls -ldh "${i}")
echo "## ${ls_ret%${IMAGE}*}${ls_ret#*${IMAGE}}" >> ${sfconf}
echo "#${i/${IMAGE}/}" >> ${sfconf}
# no delwrite() eh?
diff --git a/bin/prepalldocs b/bin/prepalldocs
index be293003f..16bd4901a 100755
--- a/bin/prepalldocs
+++ b/bin/prepalldocs
@@ -3,13 +3,13 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/prepalldocs,v 1.6 2004/10/04 13:56:50 vapier Exp $
-z="`find "${D}"usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
+z="$(find "${D}"usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null)"
for y in ${z} ; do
if [ -L "${y}" ] ; then
# Symlink ...
mylink="${y}"
- linkto="`readlink "${y}"`"
+ linkto="$(readlink "${y}")"
if [ "${linkto##*.}" != "gz" ] ; then
linkto="${linkto}.gz"
diff --git a/bin/prepinfo b/bin/prepinfo
index 4b21930bd..e2422e760 100755
--- a/bin/prepinfo
+++ b/bin/prepinfo
@@ -17,11 +17,11 @@ fi
rm -f "${z}"/{dir,dir.info,dir.info.gz}
-for x in `find "${z}"/ -mindepth 1 -maxdepth 1 \( -type f -or -type l \) 2>/dev/null` ; do
+for x in $(find "${z}"/ -mindepth 1 -maxdepth 1 \( -type f -or -type l \) 2>/dev/null) ; do
if [ -L "${x}" ] ; then
# Symlink ...
mylink="${x}"
- linkto="`readlink "${x}"`"
+ linkto="$(readlink "${x}")"
if [ "${linkto##*.}" != "gz" ] ; then
linkto="${linkto}.gz"
diff --git a/bin/quickpkg b/bin/quickpkg
index abb3d2941..61b09a609 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -9,7 +9,7 @@
# Resulting tbz2 file will be created in ${PKGDIR} ...
# default is /usr/portage/packages/All/
-if [ "`whoami`" != "root" ] ; then
+if [ "${UID}" != "0" ] ; then
echo "You must run this as root"
exit 1
fi