suitcase

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

configlib.sh (391B)


      1 setvar() {
      2 	$1="$2"
      3 }
      4 
      5 # int getccvar setvar var ifundef
      6 get1ccvar() {
      7 	if test ! -f "conf-compile/$2"; then
      8 		if test ! -f "conf-compile/defaults/$2"; then
      9 			if test ! -z "$3"; then
     10 				$1 "$3"
     11 			else
     12 				return 1 # could not give a valid argument to param setvar
     13 			fi
     14 		else
     15 			$1 "$(head -n1 "conf-compile/defaults/$2")"
     16 		fi
     17 	else
     18 		$1 "$(head -n1 "conf-compile/$2")"
     19 	fi
     20 	return 0
     21 }