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

Include utils

parent bc6431a8
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,18 @@ fi
source $PROJECT_INSTALL_DIR/${PROJECT_NAME}-vars
UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
for f in $UTILS_FILES
do
source $f
done
APP_FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
for f in $APP_FILES
do
source $f
done
command_options=$1
if [[ $command_options == "menuconfig-full" ]]; then
......@@ -237,6 +249,10 @@ function parse_args {
exit 0
fi
read_config_param 'DEFAULT_DOMAIN_NAME'
read_config_param 'MY_USERNAME'
read_config_param 'SYSTEM_TYPE'
if [ ! -d /home/$MY_USERNAME ]; then
echo $"There is no user '$MY_USERNAME' on the system. Use 'adduser $MY_USERNAME' to create the user."
exit 1
......
......@@ -31,9 +31,11 @@
function read_config_param {
param_name="$1"
if [ -f $CONFIGURATION_FILE ]; then
if grep -q "$param_name" $CONFIGURATION_FILE; then
$param_name=$(grep "$param_name" $CONFIGURATION_FILE | head -n 1 | awk -F '=' '{print $2}')
if [ $CONFIGURATION_FILE ]; then
if [ -f $CONFIGURATION_FILE ]; then
if grep -q "${param_name}" $CONFIGURATION_FILE; then
${param_name}=$(cat $CONFIGURATION_FILE | grep "${param_name}=" | head -n 1 | awk -F '=' '{print $2}')
fi
fi
fi
}
......
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