if [ -n "${PAGER}" ]
then
- PAGER=`which less`
+ PAGER=$(which less)
fi
DIALOG="${DIALOGPROG} --stdout"
diff --git a/usr/sbin/cast b/usr/sbin/cast
index c562257..ee715e3 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -480,7 +480,7 @@ pass_two() {
message "Download pass did not finish, killing it off."
# this is rather violent, but job control in bash lame and there's
# no other way to kill everything off effectively :-(
- pids="`ps x | awk -v t="$TMP_DIR" -v p=$$ -- '$0 ~ t && $1 != p {print
$1}'`"
+ pids="$(ps x | awk -v t="$TMP_DIR" -v p=$$ -- '$0 ~ t && $1 != p
{print $1}')"
for i in '' '' -9; do
kill $i $pids >/dev/null 2>&1
echo -n .; sleep 1
@@ -649,12 +649,12 @@ pass_five() {
touch $CHECK_TRIGGERS_FAILURE
touch $CONFLICT_LIST
- debug "pass_five" "SUCCESS LIST is : `cat $SUCCESS_LIST 2>/dev/null`"
- debug "pass_five" "FAILED LIST is : `cat $FAILED_LIST 2>/dev/null`"
- debug "pass_five" "CONFLICT LIST is : `cat $CONFLICT_LIST 2>/dev/null`"
- debug "pass_five" "CHECK_TRIGGERS_SUCCESS is : `cat
$CHECK_TRIGGERS_SUCCESS 2>/dev/null`"
- debug "pass_five" "bad_spells is : `hash_get_table_fields bad_spells`"
- debug "pass_five" "to_cast is : `hash_get_table_fields to_cast`"
+ debug "pass_five" "SUCCESS LIST is : $(cat $SUCCESS_LIST 2>/dev/null)"
+ debug "pass_five" "FAILED LIST is : $(cat $FAILED_LIST 2>/dev/null)"
+ debug "pass_five" "CONFLICT LIST is : $(cat $CONFLICT_LIST 2>/dev/null)"
+ debug "pass_five" "CHECK_TRIGGERS_SUCCESS is : $(cat
$CHECK_TRIGGERS_SUCCESS 2>/dev/null)"
+ debug "pass_five" "bad_spells is : $(hash_get_table_fields bad_spells)"
+ debug "pass_five" "to_cast is : $(hash_get_table_fields to_cast)"
- for item in `cat $SUCCESS_LIST 2>/dev/null`; do
+ for item in $(cat $SUCCESS_LIST 2>/dev/null); do
message "$item"
done | sort | column
@@ -675,7 +675,7 @@ pass_five() {
message "${DEFAULT_COLOR}"
message "${MESSAGE_COLOR}Spells that had a check_self trigger succeed:"
message "---------------------------------------------${SPELL_COLOR}"
- for item in `cat $CHECK_TRIGGERS_SUCCESS 2>/dev/null`; do
+ for item in $(cat $CHECK_TRIGGERS_SUCCESS 2>/dev/null); do
message "$item"
done | sort | column
message "${DEFAULT_COLOR}"
@@ -685,7 +685,7 @@ pass_five() {
message "${DEFAULT_COLOR}"
message "${MESSAGE_COLOR}Spells that had a check_self trigger fail:"
message "------------------------------------------${SPELL_COLOR}"
- for item in `cat $CHECK_TRIGGERS_FAILURE 2>/dev/null`; do
+ for item in $(cat $CHECK_TRIGGERS_FAILURE 2>/dev/null); do
message "$item"
done | sort | column
message "${DEFAULT_COLOR}"
@@ -740,7 +740,7 @@ pass_five() {
message "${MESSAGE_COLOR}The install queue is not empty, "
message "it still contains the following spells: "
message "---------------------------------------${PROBLEM_COLOR}"
- for item in `cat $INSTALL_QUEUE 2>/dev/null`; do
+ for item in $(cat $INSTALL_QUEUE 2>/dev/null); do
message "$item"
done | sort | column
message "${DEFAULT_COLOR}"
@@ -854,7 +854,7 @@ main() {
exit
fi
else
- SPELLS=`strip_parameters "$@"`
+ SPELLS=$(strip_parameters "$@")
fi
if [[ $OVERRIDE_GRIMOIRES ]] ; then
diff --git a/usr/sbin/dispel b/usr/sbin/dispel
index 67e57c0..0c25b37 100755
--- a/usr/sbin/dispel
+++ b/usr/sbin/dispel
@@ -570,7 +570,7 @@ main() {
if [ "$DOWNGRADE_SPELL" ]; then
downgrade "$DOWNGRADE_SPELL" "$DOWNGRADE_VERSION"
fi
- SPELLS=`strip_parameters "$@"`
+ SPELLS=$(strip_parameters "$@")
if [ "$NONORPHAN_DEFAULT" ] || [ "$ORPHAN_DEFAULT" ]; then
CHILD_DEPS=yes
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index f1c11a3..43446ba 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -179,7 +179,7 @@ import_snapshot_old() {
cd $SOURCE_DIRECTORY
- for LINE in `cat install`; do
+ for LINE in $(cat install); do
push_install_queue $LINE
done
report $INSTALL_QUEUE "Install Queue"
@@ -292,7 +292,7 @@ import_snapshot() {
## @param File with list of files the sum
#-----
checksum() {
- for FILE in `cat $1 | files`; do
+ for FILE in $(cat $1 | files); do
sum -s $FILE
done
}
@@ -303,7 +303,7 @@ checksum() {
## @param File with list of files the sum
#-----
md5sum_files() {
- for FILE in `cat $1 | files`; do
+ for FILE in $(cat $1 | files); do
md5sum "$FILE"
done
}
@@ -360,7 +360,7 @@ gaze_catalog() {
fi
fi
if [ $grimoire ]; then
echo "Grimoire: " $(smgl_basename $grimoire)
@@ -370,7 +370,7 @@ gaze_catalog() {
COUNT=0
- for SECTION in `codex_get_all_sections $grimoire`; do
+ for SECTION in $(codex_get_all_sections $grimoire); do
if [[ $GAZE_VERBOSE != false ]]; then
echo
echo "-------------------------------------------------"
@@ -380,7 +380,7 @@ gaze_catalog() {
echo
echo "SECTION: $( smgl_basename $SECTION )"
fi
- for spell in `codex_get_spells_in_section $SECTION`; do
+ for spell in $(codex_get_spells_in_section $SECTION); do
smgl_basename $spell
(( COUNT++ ))
done
@@ -416,7 +416,7 @@ gaze_catalog_html() {
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 STRICT//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
echo "<head>"
- echo "<title>Sorcery Grimoires for `date -u`</title>"
+ echo "<title>Sorcery Grimoires for $(date -u)</title>"
echo "<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-1\" />"
echo "<style type=\"text/css\" media=\"all\"> <!--"
echo "body"
@@ -509,12 +509,12 @@ gaze_catalog_html() {
(( COUNT=0 ))
- for SECTION in `codex_get_all_sections $grimoire`; do
+ for SECTION in $(codex_get_all_sections $grimoire); do
echo "<tr>"
echo "<th colspan=\"${COLS}\">"
echo "<h2>$( smgl_basename $SECTION )</h2>"
echo "</th></tr>"
- for SPELL in `codex_get_spells_in_section $SECTION`; do
+ for SPELL in $(codex_get_spells_in_section $SECTION); do
(
codex_set_current_spell $SPELL
if [ "$WEB_SITE" != "unknown" ]; then
- WEBSITE="`echo $WEB_SITE | cut -c-30`..."
+ WEBSITE="$(echo $WEB_SITE | cut -c-30)..."
echo "<td>"
echo "<a href=\"$WEB_SITE\">$WEBSITE</a>"
echo "</td>"
@@ -610,7 +610,7 @@ newer() {
(
echo "Grimoire|Section|Spell|Grimoire Version|Installed Version|Added"
echo "--------|-------|-----|----------------|-----------------|-----"
- for SPELL_DIR in `codex_get_all_spells`; do
+ for SPELL_DIR in $(codex_get_all_spells); do
unset ENTERED
. "$SPELL_DIR/DETAILS" 1>/dev/null 2>&1
if [ "$ENTERED" ] && [ $ENTERED -gt $DATE ]; then
@@ -636,7 +636,7 @@ older() {
(
echo "Grimoire|Section|Spell|Grimoire Version|Installed Version|Added"
echo "--------|-------|-----|----------------|-----------------|-----"
- for SPELL_DIR in `codex_get_all_spells`; do
+ for SPELL_DIR in $(codex_get_all_spells); do
unset ENTERED
. "$SPELL_DIR/DETAILS" 1>/dev/null 2>&1
if [ "$ENTERED" ] && [ $ENTERED -lt $DATE ]; then
@@ -717,7 +717,7 @@ show_spell_component() {
local COMPONENT=$1
local SPELL_NAME=$2
- local SPELL_DIRECTORY=`codex_find_spell_by_name $SPELL_NAME`
+ local SPELL_DIRECTORY=$(codex_find_spell_by_name $SPELL_NAME)
if [ -z "$SPELL_DIRECTORY" ]; then
message "No such spell '$SPELL_NAME'"
@@ -928,8 +928,8 @@ specific_voyeur()
any_voyeur()
{
# We happily assume no spell names contain "cast."
- local FILE=`find /tmp/liblock-0 -maxdepth 1 -mindepth 1 -name "cast.*" |
- sed "s/.*\/cast\.//" | head -n 1`
+ local FILE=$(find /tmp/liblock-0 -maxdepth 1 -mindepth 1 -name "cast.*" |
+ sed "s/.*\/cast\.//" | head -n 1)
[ $FILE ] || return 1
debug "voyeur" "Looking at spell \"$FILE\""
nice -n +20 \
@@ -1053,7 +1053,7 @@ show_maintainer() {
for GRIMOIRE in $(codex_get_all_grimoires); do
codex_set_grimoires $GRIMOIRE
- SECTION=`codex_find_section_by_name $section`
+ SECTION=$(codex_find_section_by_name $section)
if [[ -d "$SECTION" ]]; then
if [[ -f "$SECTION/MAINTAINER" ]]; then
echo "$(smgl_basename
${GRIMOIRE})|$section|$(<$SECTION/MAINTAINER)"
@@ -1109,7 +1109,7 @@ gaze_show_section() {
#---------------------------------------------------------------------
gaze_show_section_version_table() {
- local SPELLS=`codex_get_spells_in_section $1`
+ local SPELLS=$(codex_get_spells_in_section $1)
(
@@ -1119,7 +1119,7 @@ gaze_show_section_version_table() {
for spell in $SPELLS; do
codex_set_current_spell $spell &&
- local INSTALLED=`installed_version $SPELL` &&
+ local INSTALLED=$(installed_version $SPELL) &&
echo
"$GRIMOIRE_NAME|$SECTION|$SPELL|${VERSION:="-"}|${INSTALLED:="-"}"
done
@@ -1146,7 +1146,7 @@ gaze_show_spell_version_table() {
for SPELL in $@; do
codex_set_current_spell $SPELL &&
- local INSTALLED=`installed_version $SPELL` &&
+ local INSTALLED=$(installed_version $SPELL) &&
echo
"$GRIMOIRE_NAME|$SECTION|$SPELL|${VERSION:="-"}|${INSTALLED:="-"}"
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 7ac2289..3aa58a5 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -357,7 +357,7 @@ scribe_fix() {
if [[ $@ ]] ; then
grimoires=$@
else
- grimoires=`codex_get_all_grimoires`
+ grimoires=$(codex_get_all_grimoires)
fi
for grim in $grimoires; do
@@ -501,7 +501,7 @@ scribe_reindex() {
if [[ "$@" ]] ; then
grimoires="$@"
else
- grimoires=`codex_get_all_grimoires`
+ grimoires=$(codex_get_all_grimoires)
fi
for grim in $grimoires; do
@@ -534,7 +534,7 @@ scribe_reindex_keyword() {
if [[ "$@" ]] ; then
grimoires="$@"
else
- grimoires=`codex_get_all_grimoires`
+ grimoires=$(codex_get_all_grimoires)
fi
for grim in $grimoires; do
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index a902fa6..03c2fd0 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -101,7 +101,7 @@ mirror_list() {
select_mirror() {
- local MIRROR_LIST=`mirror_list $1`
+ local MIRROR_LIST=$(mirror_list $1)
- if MIRROR_URL=`select_mirror $COMMAND`; then
+ if MIRROR_URL=$(select_mirror $COMMAND); then
if [ "$MIRROR_URL" == "Custom" ]; then
- MIRROR_URL=`eval $DIALOG ' --inputbox "Please enter the URL." 0
0'`
+ MIRROR_URL=$(eval $DIALOG ' --inputbox "Please enter the URL." 0
0')
fi &&
- local SECTION=`codex_find_section_by_name $1`
- local SPELLS=`codex_get_spells_in_section $SECTION`
+ local SECTION=$(codex_find_section_by_name $1)
+ local SPELLS=$(codex_get_spells_in_section $SECTION)
if [ -z "$INSTALLED_SPELLS" ]; then
echo "Discovering installed spells..."
- INSTALLED_SPELLS=`show_installed_spells`
+ INSTALLED_SPELLS=$(show_installed_spells)
fi
- local SECTION=`codex_find_section_by_name $1`
- local SPELLS=`codex_get_spells_in_section $SECTION`
+ local SECTION=$(codex_find_section_by_name $1)
+ local SPELLS=$(codex_get_spells_in_section $SECTION)
for SPELL in $SPELLS; do
@@ -507,9 +507,9 @@ make_checklist() {
process_section() {
- local SECTION=`codex_find_section_by_name $1`
+ local SECTION=$(codex_find_section_by_name $1)
local KEEP_LIST=$2
- local SPELLS=`ls $GRIMOIRE/$SECTION`
+ local SPELLS=$(ls $GRIMOIRE/$SECTION)
for SPELL in $SPELLS; do
@@ -530,18 +530,18 @@ select_pkgs() {
local SELECT_TITLE="Spell Toggle Selection Menu"
local SELECT_HELP="[X]=install [ ]=remove"
- while SECTION=`select_section`; do
+ while SECTION=$(select_section); do
case $COMMAND in
@@ -656,9 +656,9 @@ spell_menu() {
grep_install_logs() {
local WHAT
- if WHAT=`eval $DIALOG ' --inputbox \
+ if WHAT=$(eval $DIALOG ' --inputbox \
"Please enter full path and name of file" \
- 0 0'`
+ 0 0')
then
cd $INSTALL_LOGS
grep "$WHAT\$" * | $PAGER
@@ -722,16 +722,16 @@ architecture_menu() {
local CURRENT_ARCH="${!1}"
local NEW_ARCH
- if NEW_ARCH=`eval $DIALOG ' --title "$ARCH_TITLE" \
+ if NEW_ARCH=$(eval $DIALOG ' --title "$ARCH_TITLE" \
--item-help \
--default-item "${CURRENT_ARCH}" \
--menu \
"$ARCH_HELP" \
0 0 0 \
- '$LIST `; then
+ '$LIST ); then
@@ -757,7 +757,7 @@ optimization_menu(){
local TINY_HELP="Optimize to smaller generated code, conflicts with
'speedy' (CFLAGS=$SMALL)"
local AS_NEEDED_HELP="Only emit DT_NEEDED entries for directly used
libraries (LDFLAGS=-Wl,--as-needed)"
modify_local_config "OPTIMIZATIONS" "$OPTIMIZATIONS"
@@ -787,13 +787,13 @@ custom_optimization_menu() {
# input box returns things of the form "RENAMED CFLAGS -O3 -march=foo
..."
# the ( ) interprits as an array, then using the magic power of set we
# get to use shift and $@ to get things done
- RESULTS=(`eval $DIALOG ' --extra-label Adjust --inputmenu \
+ RESULTS=($(eval $DIALOG ' --extra-label Adjust --inputmenu \
"Custom Optimizations Menu" \
17 50 9 \
CFLAGS "$CUSTOM_CFLAGS" \
CXXFLAGS "$CUSTOM_CXXFLAGS" \
LDFLAGS "$CUSTOM_LDFLAGS" \
- CPPFLAGS "$CUSTOM_CPPFLAGS"'`)
+ CPPFLAGS "$CUSTOM_CPPFLAGS"'))
rc=$?
[[ $rc == 0 ]] || [[ $rc == 1 ]] && break
set ${RESULTS[*]}
@@ -825,7 +825,7 @@ integrity_fix_menu() {
local SYM_HELP="Discover misowned symbolic links to files"
local MD5SUM_HELP="Discover modified binary executables, and libraries"
FIND_CHECK=off
@@ -884,7 +884,7 @@ I off . . . . . - . - . . - . . . - .
local IGNORE_ASK_HELP="Ask, but default to ignore. UNSAFE"
local IGNORE_HELP="Ignore (do not check) integrity of downloads.
DANGEROUS!"
- if INT_DL_CHECK=`eval $DIALOG ' --title "$INT_DL_TITLE" \
+ if INT_DL_CHECK=$(eval $DIALOG ' --title "$INT_DL_TITLE" \
--no-cancel \
--ok-label "Commit" \
--item-help \
@@ -896,7 +896,7 @@ I off . . . . . - . - . . - . . . - .
"B" "Ask (default abort)" "$ABORT_ASK_HELP" \
"U" "Ask (default abort save ignore)" "$ABORT_IGN_HELP" \
"G" "Ask (default ignore)" "$IGNORE_ASK_HELP" \
- "I" "Ignore (do not check)" "$IGNORE_HELP"'`
+ "I" "Ignore (do not check)" "$IGNORE_HELP"')
then
case $INT_DL_CHECK in
P) modify_local_config "MD5SUM_DL" "abort_all" ;;
@@ -917,7 +917,7 @@ gpg_download_menu() {
local SRY_HELP="Toggle sorcery gpg signature checking on sorcery update"
local GRM_HELP="Toggle grimoire gpg signature checking on scribe update"
- if SORCERER=`eval $DIALOG ' --ok-label "Commit" \
+ if SORCERER=$(eval $DIALOG ' --ok-label "Commit" \
--inputbox \
"Please enter the email address of the person or role account
that should receive reports from this box." \
- 0 0 "$SORCERER"'`
+ 0 0 "$SORCERER"')
then
modify_local_config "SORCERER" "$SORCERER"
@@ -1158,7 +1158,7 @@ service_defaults() {
local MENU_TITLE="Init.d/Xinetd Default Answer Selection Menu"
local MENU_INFO="Choose your defaults\nPer spell answers are remembered on
recasts"
local RESULT RESULTS TMP i
- if RESULTS=`eval $DIALOG '--item-help \
+ if RESULTS=$(eval $DIALOG '--item-help \
--backtitle backtitle \
--separate-output \
--title "$MENU_TITLE" \
@@ -1173,7 +1173,7 @@ service_defaults() {
"ENABLE_XINETD" "Enable xinetd scripts by default" \
"$DEF_ENABLE_XINETD" "$INSTALL_XINETD_HELP" \
"INIT_VS_XINETD" "Prefer xinetd over init.d" \
- "$DEF_INIT_VS_XINETD" "$INIT_VS_XINETD"'`
+ "$DEF_INIT_VS_XINETD" "$INIT_VS_XINETD"')
then
TEMP=(DEF_INSTALL_INIT DEF_ENABLE_INIT DEF_INSTALL_XINETD
DEF_ENABLE_XINETD DEF_INIT_VS_XINETD)
@@ -1207,13 +1207,13 @@ parallel_compilation_menu() {
# input box returns things of the form "RENAMED CFLAGS -O3 -march=foo
..."
# the ( ) interprits as an array, then using the magic power of set we
# get to use shift and $@ to get things done
- RESULTS=(`eval $DIALOG ' --extra-label Adjust --inputmenu \
+ RESULTS=($(eval $DIALOG ' --extra-label Adjust --inputmenu \
"$TITLE\n$HELP" \
23 70 9 \
DISTCC_HOSTS "$DISTCC_HOSTS" \
JOBS_PER_HOST "$JOBS_PER_HOST" \
EXTRA_JOBS "$MAKE_NJOBS" \
- CCACHE_DIR "$CCACHE_DIR"'`)
+ CCACHE_DIR "$CCACHE_DIR"'))
rc=$?
@@ -1282,14 +1282,14 @@ set_custom_branch() {
local C_HELP="Please choose the sorcery release/version you want to use,
this can be anything you want from
download.sourcemage.org/sorcery/sorcery-<version>.tar.bz2"
while
- if PROMPT_DELAY=`eval $DIALOG ' --ok-label "Commit" \
+ if PROMPT_DELAY=$(eval $DIALOG ' --ok-label "Commit" \
--inputbox \
"Please enter the time in seconds to wait for a
response when prompted with a question." \
- 0 0 "$PROMPT_DELAY"'`
+ 0 0 "$PROMPT_DELAY"')
then
D) TEXT="Note: if you turn this on, don't forget to empty the log file
occasionaly.\nWhat file do you want the debugging logged to?"
- FILE=`eval $DIALOG --ok-label "Commit" --inputbox \"$TEXT\" 0 0
\"$DEBUG\"` &&
+ FILE=$(eval $DIALOG --ok-label "Commit" --inputbox \"$TEXT\" 0 0
\"$DEBUG\") &&
modify_local_config "DEBUG" "$FILE" ;;
S) TEXT="Note: You don't want to do this probably. Don't forget to
2>/root/debug.out.\nDo you want super debugging on?"
- TOGGLE=`eval $DIALOG --yesno \"$TEXT\" 0 0` &&
+ TOGGLE=$(eval $DIALOG --yesno \"$TEXT\" 0 0) &&
( modify_local_config "SUPER_DEBUG" "on" ; modify_local_config "set"
"-x" "command" ) ||
( modify_local_config "SUPER_DEBUG" "" ; modify_local_config "set"
"+x" "command" ) ;;
C) TEXT="Note: This is a numeric value that represents a mask to
castfs, 0 means no debugging, 1 means file system debugging, 2 is lower level
debugging, 3 means both. All other values are currently undefined."
- LEVEL=`eval $DIALOG --ok-label "Commit" --inputbox \"$TEXT\" 0 0
\"$CASTFS_DEBUG_LEVEL\"` &&
+ LEVEL=$(eval $DIALOG --ok-label "Commit" --inputbox \"$TEXT\" 0 0
\"$CASTFS_DEBUG_LEVEL\") &&
modify_local_config "CASTFS_DEBUG_LEVEL" "$LEVEL" ;;
esac
@@ -1568,7 +1568,7 @@ feature_menu() {
local PSC_HELP="Ask for custom cflags for each spell"
local SHSQ_HELP="Show spell description option in queries for optional
dependencies"
case $COMMAND in
@@ -1999,7 +1999,7 @@ verify_parameters "$@"
if [ "$UID" = 0 ]; then
DIALOG='$DIALOGPROG --backtitle "Sorcery Spell Management Utility"
--stdout'
- SORCERY_VERSION=`cat /etc/sorcery/version`
+ SORCERY_VERSION=$(cat /etc/sorcery/version)
mk_tmp_dirs sorcery
init_hooks
main "$@"
diff --git a/usr/sbin/summon b/usr/sbin/summon
index 139df55..41369de 100755
--- a/usr/sbin/summon
+++ b/usr/sbin/summon
@@ -202,7 +202,7 @@ main() {
fi
if [ -n "$SUMMON_ALL" ]; then
- spells_to_get=`codex_get_all_spells|get_basenames`
+ spells_to_get=$(codex_get_all_spells|get_basenames)
elif [ -n "$QUEUE" ]; then
# Since sometimes we'll be running in raw output mode and possibly
@@ -218,7 +218,7 @@ main() {
fi
spells_to_get=$(< $INSTALL_QUEUE)
else
- spells_to_get=`strip_parameters $*`
+ spells_to_get=$(strip_parameters $*)
fi
if [ -n "$PRINT_TYPE" ]; then
diff --git a/usr/sbin/vcast b/usr/sbin/vcast
index 5b301e8..53cdd94 100755
--- a/usr/sbin/vcast
+++ b/usr/sbin/vcast
@@ -65,7 +65,7 @@ strip_parameters() {
}
- local GRIMOIRES=`codex_get_all_grimoires`
+ local GRIMOIRES=$(codex_get_all_grimoires)
local CURRENT_GRIMOIRE=0
local GRIMOIRE_COUNT=0
local SEEN_GRIMOIRES=""
@@ -399,7 +399,7 @@ codex_find_section_by_name() {
local SECTION_NAME="$1"
local GRIMOIRE=''
- for GRIMOIRE in `codex_get_all_grimoires`; do
+ for GRIMOIRE in $(codex_get_all_grimoires); do
if [ -d "$GRIMOIRE/$SECTION_NAME" ] ; then
debug "libcodex" "codex_find_section_by_name() - found section
$GRIMOIRE/$SECTION_NAME"
if [[ -z $2 ]]; then
@@ -434,7 +434,7 @@ codex_get_all_sections() {
if [[ $# -gt 0 ]]; then
codex_get_sections $@
else
- codex_get_sections `codex_get_all_grimoires`
+ codex_get_sections $(codex_get_all_grimoires)
fi
}
for CHECK in $SOUND_CHECKS; do
@@ -171,7 +171,7 @@ color_schemes_menu() {
local D_HELP="Dark color scheme for use on bright backgrounds"
local B_HELP="blueish color scheme"
then
case $COMMAND in
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 3b7334a..572a2d8 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -732,11 +732,11 @@ real_list_remove() {
local i
for i in $@; do
- eval "$var=\`echo \" \$$var \" | sed \
+ eval "$var=\$(echo \" \$$var \" | sed \
-e \"s/[\t\v\f\r ]\\+/ /g\" \
-e \"s/ $i / /g\" \
-e \"s/^ *//\" \
- -e \"s/ *$//\"\`"
+ -e \"s/ *$//\"\)"
done
}
@@ -762,7 +762,7 @@ real_list_add() {
}
iterate list_add_sub " " "$(eval "echo \$$var")"
if [ $found -eq 0 ]; then
- eval "$var=\`echo \"\$$var $i\"\`"
+ eval "$var=\$(echo \"\$$var $i\"\)"
eval "$var=\"\${$var/# /}\""
fi
done
diff --git a/var/lib/sorcery/modules/libsecurity
b/var/lib/sorcery/modules/libsecurity
index 0430252..e267114 100755
--- a/var/lib/sorcery/modules/libsecurity
+++ b/var/lib/sorcery/modules/libsecurity
@@ -74,16 +74,16 @@ gaze_checkmd5() {
then
if ! filename_indicates_compression "$SOURCE_CACHE/$SOURCE"
then
- fMD5=`cat $SOURCE_CACHE/$SOURCE 2> /dev/null | md5sum | cut -d' '
-f1 | head -n 1`
+ fMD5=$(cat $SOURCE_CACHE/$SOURCE 2> /dev/null | md5sum | cut -d' '
-f1 | head -n 1)
else
fMD5=$(
- uncompress $SOURCE_CACHE/$SOURCE `
- guess_compressor $SOURCE_CACHE/$SOURCE` |
+ uncompress $SOURCE_CACHE/$SOURCE $(
+ guess_compressor $SOURCE_CACHE/$SOURCE) |
md5sum | cut -d' ' -f1
)
fi
else
- fMD5="`grep " $SOURCE\$" $PRECACHEDF | grep -Ev '\.[0-9]{14}$' | grep
-v '\.asc$' | cut -d' ' -f1 | head -n 1`"
+ fMD5="$(grep " $SOURCE\$" $PRECACHEDF | grep -Ev '\.[0-9]{14}$' | grep
-v '\.asc$' | cut -d' ' -f1 | head -n 1)"
fi
if [ -n "$REALSOURCE" ]
then
@@ -119,9 +119,9 @@ gaze_checkmd5() {
else
if test -z "$PRECACHEDB"
then
- bMD5="`md5sum $SOURCE_CACHE/$SOURCE | cut -d' ' -f1` | head -n
1"
+ bMD5="$(md5sum $SOURCE_CACHE/$SOURCE | cut -d' ' -f1) | head
-n 1"
else
- bMD5="`grep " $SOURCE\$" $PRECACHEDB | grep -Ev '\.[0-9]{14}$'
| grep -v '\.asc$'`"
+ bMD5="$(grep " $SOURCE\$" $PRECACHEDB | grep -Ev
'\.[0-9]{14}$' | grep -v '\.asc$')"
fi
if test "$tMD5" == "$bMD5"
then
@@ -132,13 +132,13 @@ gaze_checkmd5() {
elif test "$tMD5" == "gpg"
then
echo -en "${RED}${BOLD}GPGCHECK $SRCDATA"
- elif test -n "`echo $tMD5 | grep 'gpg$'`"
+ elif test -n "$(echo $tMD5 | grep 'gpg$')"
then
echo -en "${RED}${BOLD}GPG-SIGN $SRCDATA"
- elif test -n "$PRECACHEDB" && test -n "`grep $tMD5 $PRECACHEDF`"
+ elif test -n "$PRECACHEDB" && test -n "$(grep $tMD5 $PRECACHEDF)"
then
- MATCHED="`grep "$tMD5" "$PRECACHEDF" | cut -c60- | head -n 1`"
- if test -n "`echo "$MATCHED" | fgrep "$SOURCE"`"
+ MATCHED="$(grep "$tMD5" "$PRECACHEDF" | cut -c60- | head -n 1)"
+ if test -n "$(echo "$MATCHED" | fgrep "$SOURCE")"
then
echo -en "${RED}${BOLD}MODIFIED $SRCDATA EDIT
s/$tMD5/$fMD5/${DEFAULT_COLOR} MATCHES $MATCHED"
else
@@ -179,24 +179,24 @@ gaze_checkmd5syntax() {
echo -en "${YELLOW}${BOLD}"
if test -f $rp/PRE_BUILD ; then
#echo $rp $sn
- if test "`grep unpack $rp/* | grep SOURCE$sn[^0-9] | grep MD5`" = "" ;
then
+ if test "$(grep unpack $rp/* | grep SOURCE$sn[^0-9] | grep MD5)" = "" ;
then
if test "$sn" != "" ; then
echo -n "ADD unpack md5 arg to EXISTING PRE_BUILD"
else
- if test "`grep default_pre_build $rp/*`" = "" ; then
+ if test "$(grep default_pre_build $rp/*)" = "" ; then
echo -n "ADD unpack md5 arg to EXISTING PRE_BUILD"
fi
fi
fi
else
if test -f $rp/POST_INSTALL ; then
- if test "`grep unpack $rp/* | grep SOURCE$sn[^0-9] | grep MD5`" = "" ;
then
+ if test "$(grep unpack $rp/* | grep SOURCE$sn[^0-9] | grep MD5)" = ""
; then
if test "$sn" != "" ; then
echo -n "ADD unpack md5 arg to EXISTING POST_INSTALL or CREATED
PRE_BUILD"
fi
fi
elif test -f $rp/BUILD ; then
- if test "`grep unpack $rp/* | grep SOURCE$sn[^0-9] | grep MD5`" = "" ;
then
+ if test "$(grep unpack $rp/* | grep SOURCE$sn[^0-9] | grep MD5)" = ""
; then
if test "$sn" != "" ; then
echo -n "INIT unpack md5 arg or default_pre_build to NEW PRE_BUILD"
fi
@@ -226,7 +226,7 @@ gaze_checkmd5s() {
spellroot=$1
SCRIPT_DIRECTORY=$spellroot
spellpath=$spellroot/DETAILS
- spellname=`echo $spellroot | sed -e 's!/.*/!!'`
+ spellname=$(echo $spellroot | sed -e 's!/.*/!!')
unset FORCE_DOWNLOAD
unset SOURCE
unset MD5 2> /dev/null
@@ -277,7 +277,7 @@ gaze_md5check() {
for i in $SECTIONS ; do
- SPELLS="$SPELLS `codex_get_spells_in_section $i`"
+ SPELLS="$SPELLS $(codex_get_spells_in_section $i)"
done
for i in $SPELLS ; do
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 0933912..6d2b76d 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -28,7 +28,7 @@ update_sorcery_scripts() {
#This section is to make sure that all sorcery dependencies are cast
#Keep this outer if until basesystem is in the grimoires properly.
#(2002/10/13)
- if [[ `codex_find_spell_by_name basesystem` ]] ; then
+ if [[ $(codex_find_spell_by_name basesystem) ]] ; then
if ! spell_ok basesystem ; then
cast basesystem
fi &&
@@ -79,7 +79,7 @@ update_sorcery_scripts() {
tar --owner=root --group=root -xf /dev/stdin &&
cd $SOURCE_DIRECTORY &&
- echo `pwd` || return 1
+ pwd || return 1
# last chance to lock
message -n "${MESSAGE_COLOR}Waiting for${DEFAULT_COLOR}
${SPELL_COLOR}all${DEFAULT_COLOR}" \
@@ -107,7 +107,7 @@ update_sorcery_scripts() {
cd / &&
unlock_resources "libgrimoire" "install" &&
[ -f $TRIGGER_LIST ] || return 0
# no locking of $TRIGGER_LIST since the triggered actions may need it
- iterate do_trigger $'\n' "`grep "^[^:]*:$spell:on_$action" $TRIGGER_LIST`"
+ iterate do_trigger $'\n' "$(grep "^[^:]*:$spell:on_$action" $TRIGGER_LIST)"
}
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/liburl b/var/lib/sorcery/modules/liburl
index e3c250a..39d4c39 100755
--- a/var/lib/sorcery/modules/liburl
+++ b/var/lib/sorcery/modules/liburl
@@ -81,10 +81,10 @@
#
# (2002/09/29) added if so it only loads the stuff once
if ! [[ $URL_HANDLER_FILES ]] ; then
- URL_HANDLER_FILES=`ls $SGL_LIBRARY_MODULES/url_handlers/url_*[^~]`
+ URL_HANDLER_FILES=$(ls $SGL_LIBRARY_MODULES/url_handlers/url_*[^~])
for url_handler_file in $URL_HANDLER_FILES; do
[ -x $url_handler_file ] &&
- URL_PREFIX=`echo $url_handler_file | sed "s/.*\/url_//"` &&
+ URL_PREFIX=$(echo $url_handler_file | sed "s/.*\/url_//") &&
URL_TYPES[${#URL_TYPES[@]}]=$URL_PREFIX &&
. $url_handler_file
done
diff --git a/var/lib/sorcery/modules/url_handlers/url_cvs
b/var/lib/sorcery/modules/url_handlers/url_cvs
index 5cd0b9c..7d144b0 100755
--- a/var/lib/sorcery/modules/url_handlers/url_cvs
+++ b/var/lib/sorcery/modules/url_handlers/url_cvs
@@ -82,11 +82,11 @@
#---------------------------------------------------------------------
url_cvs_crack() {
- URL=`url_strip_prefix "$1" cvs`
- CVS_ROOT=`echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#"`
- local CVS_MODULE_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"`
- CVS_MODULE=`echo $CVS_MODULE_TAG | cut -d : -f2`
- local CVS_TAGNAME=`echo $CVS_MODULE_TAG | cut -d : -f3`
+ URL=$(url_strip_prefix "$1" cvs)
+ CVS_ROOT=$(echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#")
+ local CVS_MODULE_TAG=$(echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#")
+ CVS_MODULE=$(echo $CVS_MODULE_TAG | cut -d : -f2)
+ local CVS_TAGNAME=$(echo $CVS_MODULE_TAG | cut -d : -f3)
CVS_TAG=${CVS_TAGNAME:=HEAD}