edit a mkbuild
${red}-wc${normal}, ${red}--working-copy${normal}
create an unversioned mkbuild working copy
+ ${red}--get-param-copy${normal}
+ get a parameter from a given mkbuild
${red}EXAMPLES${normal}
${red}mkbuild -sa pyrex.mkbuild${normal}
ACTION='working_copy'
break # we need to break otherwise specific arguments are evalued
;;
+ '--get-param')
+ # Get parameter for a given mkbuild
+ set_mkbuild_name $2
+ ACTION='get_param'
+ break # we need to break otherwise specific arguments are evalued
+ ;;
'-d'|'--debug')
# Debug mode
set -x
}
+function get_param {
+
+ # get a parameter from a mkbuild file
+ # usage: get_param <parameter>
+
+ local parameter="`echo $* | tr '[:lower:]' '[:upper:] | tr -d '"' | tr -d "'"'`"
+
+ if [ -e "$MKBUILD_NAME" ]; then
+ grep -e "\[\[$parameter\]\]" $MKBUILD_NAME | cut -d = -f 2 | tr -d '"' | tr -d "'"
+ fi
+
+}
+
# ----------------------------------------------------------------
#=============================
'working_copy')
working_copy
;;
+ 'get_param')
+ shift 2
+ get_param $*
+ ;;
esac
# Clear temporary files