|
|
@@ -113,6 +113,19 @@ check_result() {
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+# Source conf in installer
|
|
|
+source_conf() {
|
|
|
+ while IFS='= ' read -r lhs rhs; do
|
|
|
+ if [[ ! $lhs =~ ^\ *# && -n $lhs ]]; then
|
|
|
+ rhs="${rhs%%^\#*}" # Del in line right comments
|
|
|
+ rhs="${rhs%%*( )}" # Del trailing spaces
|
|
|
+ rhs="${rhs%\'*}" # Del opening string quotes
|
|
|
+ rhs="${rhs#\'*}" # Del closing string quotes
|
|
|
+ declare -g $lhs="$rhs"
|
|
|
+ fi
|
|
|
+ done < $1
|
|
|
+}
|
|
|
+
|
|
|
# Defining function to set default value
|
|
|
set_default_value() {
|
|
|
eval variable=\$$1
|