--- trunk/mage/usr/lib/mage/smage2.functions.sh 2014/01/06 12:56:50 2365 +++ branches/mage-next/src/smage2.functions.sh.in 2014/09/19 11:19:35 2832 @@ -79,51 +79,6 @@ fi } -showversion() -{ - echo -en "Magellan Source Install v${SMAGEVERSION} " - echo -e "-- Niels Rogalla (niro@magellan-linux.de)" -} - -die() -{ - xtitleclean - echo -e ${COLRED}"Exited ${BASH_SOURCE} at line no ${BASH_LINENO}."${COLDEFAULT} - echo "SMAGE failed: $@" - exit 1 -} - -die_pipestatus() -{ - # the status change if we do any parameter declarations!! - # dont do this anymore, keep this in mind! - # - # local pos="$1" - # local comment="$2" - # - # [ ${PIPESTATUS[${pos}]} -ne 0 ] && die "${comment}" - # - [ ${PIPESTATUS[$1]} -ne 0 ] && die "$2" -} - -xtitle() -{ - if [[ ${TERM} = xterm ]] - then - echo -ne "\033]0;[sMage: $@]\007" - fi - return 0 -} - -xtitleclean() -{ - if [[ ${TERM} = xterm ]] - then - echo -ne "\033]0;\007" - fi - return 0 -} - syncsmage2() { xtitle "Updating smage2-script tree ..." @@ -225,6 +180,13 @@ } # dummy function, used if that does not exist in smage file +pkg_setup() +{ + echo "no pkg_setup defined; doing nothing ..." + return 0 +} + +# dummy function, used if that does not exist in smage file src_prepare() { echo "no src_prepare defined; doing nothing ..." @@ -633,7 +595,14 @@ if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]] then - echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')" + # evaluate with escape strings for the magefile if called by smage + # but do not escape if the smagefile was called by depwalker directly + if [[ ${SMAGE_DEPEND} = 1 ]] + then + eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n' + else + echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')" + fi retval=0 else retval=1 @@ -651,7 +620,14 @@ if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]] then - echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')" + # evaluate with escape strings for the magefile if called by smage + # but do not escape if the smagefile was called by depwalker directly + if [[ ${SMAGE_DEPEND} = 1 ]] + then + eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n' + else + echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')" + fi retval=0 else retval=1