Browse Source

Reading the project repo

Bob Mottram 8 years ago
parent
commit
7bac22dbf7
3 changed files with 11 additions and 7 deletions
  1. 7
    0
      src/freedombone-image
  2. 1
    7
      src/freedombone-upgrade
  3. 3
    0
      src/freedombone-utils-setup

+ 7
- 0
src/freedombone-image View File

@@ -35,7 +35,14 @@ PROJECT_NAME='freedombone'
35 35
 export TEXTDOMAIN=${PROJECT_NAME}-image
36 36
 export TEXTDOMAINDIR="/usr/share/locale"
37 37
 
38
+#get the project repo
38 39
 PROJECT_REPO="https://github.com/bashrc/${PROJECT_NAME}"
40
+UTILS_FILES=/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-*
41
+for f in $UTILS_FILES
42
+do
43
+  source $f
44
+done
45
+read_config_param PROJECT_REPO
39 46
 
40 47
 # recommended RAM for virtual machines
41 48
 VM_MEMORY='1G'

+ 1
- 7
src/freedombone-upgrade View File

@@ -47,13 +47,7 @@ for f in $UTILS_FILES
47 47
 do
48 48
   source $f
49 49
 done
50
-
51
-if [ -f $CONFIGURATION_FILE ]; then
52
-    # read the location of the main project repo
53
-    if grep -q "PROJECT_REPO" $CONFIGURATION_FILE; then
54
-        PROJECT_REPO=$(grep "PROJECT_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
55
-    fi
56
-fi
50
+read_config_param PROJECT_REPO
57 51
 
58 52
 update-ca-certificates
59 53
 

+ 3
- 0
src/freedombone-utils-setup View File

@@ -257,6 +257,9 @@ function setup_firewall {
257 257
 }
258 258
 
259 259
 function setup_utils {
260
+    read_config_param "PROJECT_REPO"
261
+    write_config_param "PROJECT_REPO" "$PROJECT_REPO"
262
+
260 263
     function_check create_completion_file
261 264
     create_completion_file
262 265