Author: ks156
Date: 2008-12-01 10:55:21 +0100 (Mon, 01 Dec 2008)
New Revision: 2951

Modified:
   software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh
Log:
* Added the tools and the gadgets


Modified: 
software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh
===================================================================
--- software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh  
2008-12-01 09:45:43 UTC (rev 2950)
+++ software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh  
2008-12-01 09:55:21 UTC (rev 2951)
@@ -16,8 +16,8 @@
 INST_DIR=installers/unix32
 
 CONTROL_CENTER_URL=$KYSOH_URL/applications/common/control_center
-#GADGET_URL=$KYSOH_URL/$GADGET_DIR
-#TOOLS_URL=$KYSOH_URL/$INST_DIR/tools
+GADGET_URL=$KYSOH_URL/gadgets
+TOOLS_URL=$KYSOH_URL/tools
 #ATT_URL=$KYSOH_URL/$INST_DIR/attitunes
 #SKIN_URL=http://www.kysoh.com/download/resources/skin
 TMP_RULES_FILE=/tmp/tuxtmp
@@ -371,27 +371,43 @@
 
 installFromFtp () {
     while read line; do
+        # sed :
+        # I have to replace $PREFIX (ascii sequence) by the environment
+        # variable.
         echo $line|cut -d ';' -f 3 |sed "s/\$PREFIX/\\${PREFIX}/g" >path
         path=`cat path`
         echo $path
         rm path
         echo $line|cut -d ';' -f 4 |sed "s/\$PREFIX/\\${PREFIX}/g" >url
         url=`cat url`
-        echo $url
         rm url
-        wget $url -O $MIRROR_DIR/$path
+        # Retrieve the filename from the PATH
+        file=${path##*/}
+        # Substract the filename to the path
+        path=${path%%$file}
+        if [ ! -d $MIRROR_DIR/$path ]; then
+            mkdir -p $MIRROR_DIR/$path
+        fi
+        wget $url -O $MIRROR_DIR/$path/$file
 
     done < /tmp/tuxtmp1
 }
 
-parseFtp () {
-    python getRules.py $VERSION_TYPE LINUX $CONTROL_CENTER_URL $TMP_RULES_FILE
+retrieveFiles () {
+    python getRules.py $VERSION_TYPE LINUX $1 $TMP_RULES_FILE
     echo $?
+    # Remplace all | by ; to avoid pipelining
     sed 's/|/;/g' $TMP_RULES_FILE > /tmp/tuxtmp1
     installFromFtp
     rm /tmp/tuxtmp1 $TMP_RULES_FILE
 }
 
+parseFtp () {
+    retrieveFiles $CONTROL_CENTER_URL
+    retrieveFiles $GADGET_URL
+    retrieveFiles $TOOLS_URL
+}
+
 # Create the updater binary
 updaterBin () {
     echo "-- Creating tux_updater binary"


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to