Magellan Linux

Diff of /trunk/mage/usr/lib/mage/smage2.functions.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3179 by niro, Mon Jul 31 09:11:43 2023 UTC revision 3180 by niro, Mon Jul 31 09:19:58 2023 UTC
# Line 654  marchdepend() Line 654  marchdepend()
654    
655   [[ -z ${var} ]] && var="DEPEND"   [[ -z ${var} ]] && var="DEPEND"
656    
657   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \"\$${var}_${ARCH/i*86/x86}\") ]]
658   then   then
659   # evaluate with escape strings for the magefile if called by smage   # evaluate with escape strings for the magefile if called by smage
660   # but do not escape if the smagefile was called by depwalker directly   # but do not escape if the smagefile was called by depwalker directly
661   if [[ ${SMAGE_DEPEND} = 1 ]]   if [[ ${SMAGE_DEPEND} = 1 ]]
662   then   then
663   eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n'   eval echo \"\$${var}_${ARCH/i*86/x86}\" | tr ';' '\n'
664   else   else
665   echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')"   echo "\$(eval echo \\\"\\\$${var}_\${ARCH/i*86/x86}\\\" | tr ';' '\n')"
666   fi   fi
667   retval=0   retval=0
668   else   else
# Line 679  marchsdepend() Line 679  marchsdepend()
679    
680   [[ -z ${var} ]] && var="SDEPEND"   [[ -z ${var} ]] && var="SDEPEND"
681    
682   if [[ ! -z $(eval echo \$${var}_${ARCH/i*86/x86}) ]]   if [[ ! -z $(eval echo \"\$${var}_${ARCH/i*86/x86}\") ]]
683   then   then
684   # evaluate with escape strings for the magefile if called by smage   # evaluate with escape strings for the magefile if called by smage
685   # but do not escape if the smagefile was called by depwalker directly   # but do not escape if the smagefile was called by depwalker directly
686   if [[ ${SMAGE_DEPEND} = 1 ]]   if [[ ${SMAGE_DEPEND} = 1 ]]
687   then   then
688   eval echo \$${var}_${ARCH/i*86/x86} | tr ';' '\n'   eval echo \"\$${var}_${ARCH/i*86/x86}\" | tr ';' '\n'
689   else   else
690   echo "\$(eval echo \\\$${var}_\${ARCH/i*86/x86} | tr ';' '\n')"   echo "\$(eval echo \\\"\\\$${var}_\${ARCH/i*86/x86}\\\" | tr ';' '\n')"
691   fi   fi
692   retval=0   retval=0
693   else   else
# Line 813  build_mage_script() Line 813  build_mage_script()
813   for i in ${SPECIAL_VARS}   for i in ${SPECIAL_VARS}
814   do   do
815   # being tricky here :)   # being tricky here :)
816   echo "${i}=\"$(eval echo \$${i})\"" >> ${dest}   echo "${i}=\"$(eval echo \"\$${i}\")\"" >> ${dest}
817   done   done
818   fi   fi
819    

Legend:
Removed from v.3179  
changed lines
  Added in v.3180