]>
Dogcows Code - chaz/yoink/blob - build/functions.sh
3 # Print error message to stderr and exit. The error message can either be
4 # given as parameters or from stdin.
7 echo -n "fatal: " >/dev
/stderr
14 echo $line >/dev
/stderr
20 # Parse an argument from an option in the form --option=argument.
23 echo $(echo $2 | sed -e "s/--$1=\\(.*\\)$
/\\1/")
27 # Insert all the escapes necessary to correctly quote a string for use in a
33 echo $1 | sed -e "s
/'/\\'/g
" \
49 # Add a definition to the compiler flags. The optional second parameter is
55 defines="$defines -D$1"
57 defines="$defines -D$1=$2"
61 # Add a definition to the compiler flags with a quoted value.
64 arg=$(quote_string "$2")
65 define "$1" "\\\"$arg\\\""
72 defines="$defines -U$arg"
80 echo "$defines" | grep -e "-D$arg" 2>&1 >/dev/null || return 1
89 echo "$defines" | grep -e "-U$arg" 2>&1 >/dev/null || return 1
This page took 0.031803 seconds and 4 git commands to generate.