Skip to content
Snippets Groups Projects
Commit f3a6124f authored by Bob Mottram's avatar Bob Mottram
Browse files

Tidying

parent f1ba8298
No related branches found
No related tags found
No related merge requests found
......@@ -124,15 +124,12 @@ function write_config_param {
param_name="$1"
param_value="$2"
if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg
fi
if [ ${#param_name} -gt 0 ]; then
if [ ${#param_value} -gt 0 ]; then
# set configuration file location if needed
test_config_file="$CONFIGURATION_FILE"
if [ ${#test_config_file} -eq 0 ]; then
$CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg
fi
# update the configuration file
if [ -f $CONFIGURATION_FILE ]; then
if grep -q "${param_name}=" $CONFIGURATION_FILE; then
sed -i "s|${param_name}=.*|${param_name}=${param_value}|g" $CONFIGURATION_FILE
......@@ -147,10 +144,6 @@ function write_config_param {
}
function save_configuration_values {
if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE=$HOME/${PROJECT_NAME}.cfg
fi
for v in "${configuration_variables[@]}"
do
write_config_param "$v" "${!v}"
......
......@@ -35,10 +35,14 @@ fi
DEFAULT_DOMAIN_NAME=
DEFAULT_DOMAIN_CODE=
MY_USERNAME=
SYSTEM_TYPE="full"
if [ ! $SYSTEM_TYPE ]; then
SYSTEM_TYPE="full"
fi
# An optional configuration file which overrides some of these variables
CONFIGURATION_FILE="$HOME/${PROJECT_NAME}.cfg"
if [ ! $CONFIGURATION_FILE ]; then
CONFIGURATION_FILE="$HOME/${PROJECT_NAME}.cfg"
fi
# Directory where source code is downloaded and compiled
INSTALL_DIR=$HOME/build
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment