Author: ks156
Date: 2008-11-28 14:53:55 +0100 (Fri, 28 Nov 2008)
New Revision: 2906

Modified:
   software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh
Log:
* Reorganize dthe functions and added comments


Modified: 
software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh
===================================================================
--- software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh  
2008-11-28 12:59:51 UTC (rev 2905)
+++ software_suite_v2/tuxware/installers/unix/branches/prefix_install/build.sh  
2008-11-28 13:53:55 UTC (rev 2906)
@@ -66,7 +66,7 @@
 VER_FILE=$SHARE_ROOT/versions.txt
 CONF_FILE=$CONF_DIR/tuxdroid.conf
 
-
+# List the differents version on the SVN server
 listServer() {
     echo ==== Choose a version ====
     NUM=1
@@ -91,6 +91,7 @@
     echo ''
 }
 
+# Create a temp dir
 createTemp () {
     echo Creating directories
     if [ -d $TEMP_DIR ]; then
@@ -106,6 +107,7 @@
     mkdir $BUILD_DIR
 }
 
+# Create /etc
 createEtcDir () {
     echo Creating /etc directory
     mkdir -p $BUILD_DIR
@@ -127,11 +129,14 @@
     echo "IUUID=$UUID" >> $MIRROR_DIR/$CONF_FILE
 }
 
-packDebInitScript () {
-    mkdir $MIRROR_DIR/$ETC_DIR/init.d
-    cp build_deps/deb/init/tuxhttpserver $MIRROR_DIR/$ETC_DIR/init.d
+# Create /usr
+createUsrDir () {
+    echo "Creating /usr directory"
+    mkdir -p $MIRROR_DIR/usr
+    cp -rf build_deps/common/launcher/* $MIRROR_DIR/usr/
 }
 
+# Create the $PREFIX dir
 createBaseDir () {
     echo "Creating base directory"
     mkdir -p $BUILD_DIR
@@ -168,6 +173,7 @@
     echo "" >> $MIRROR_DIR/$PREFIX/$VER_FILE
 }
 
+# Install the server from SVN
 packServer () {
     echo "-- Copying the server from SVN"
     echo "Server version : " >> $MIRROR_DIR/$PREFIX/$VER_FILE
@@ -189,6 +195,7 @@
     cp -r $TEMP_DIR/tuxhttpserver/* $MIRROR_DIR/$PREFIX/$SERVER_DIR
 }
 
+# Install the python API from SVN
 packPythAPI () {
     echo "-- Copying the python API"
     echo "Python API version : " >> $MIRROR_DIR/$PREFIX/$VER_FILE 
@@ -211,16 +218,7 @@
     cp -r $TEMP_DIR/python_api/* $MIRROR_DIR/$PREFIX/$LIB_PYTHON_API
 }
 
-compileDriver () {
-    svn export --force \
-       http://svn.tuxisalive.com/software_suite_v2/tuxware/tuxdriver/trunk 
/tmp/tuxdriver
-    cd /tmp/tuxdriver/unix
-    make
-    cd -
-    cp /tmp/tuxdriver/unix/libtuxdriver.so 
$MIRROR_DIR/$PREFIX/$LIB_PYTHON_API/tuxisalive/lib/driver
-    rm -rf /tmp/tuxdriver
-}
-
+# Install the Java API from SVN
 packJavaAPI () {
     echo "-- Copying the java API"
     echo "Java API version : " >> $MIRROR_DIR/$PREFIX/$VER_FILE 
@@ -239,6 +237,18 @@
     cp -r $TEMP_DIR/java_api/* $MIRROR_DIR/$PREFIX/$LIB_JAVA_API
 }
 
+# Compile the driver from SVN
+compileDriver () {
+    svn export --force \
+       http://svn.tuxisalive.com/software_suite_v2/tuxware/tuxdriver/trunk 
/tmp/tuxdriver
+    cd /tmp/tuxdriver/unix
+    make
+    cd -
+    cp /tmp/tuxdriver/unix/libtuxdriver.so 
$MIRROR_DIR/$PREFIX/$LIB_PYTHON_API/tuxisalive/lib/driver
+    rm -rf /tmp/tuxdriver
+}
+
+# Compile Tuxup from SVN
 compTuxup () {
     echo "-- Compiling tuxup"
     echo "Tuxup version : " >> $MIRROR_DIR/$PREFIX/$VER_FILE 
@@ -262,6 +272,7 @@
     cp build_deps/common/dfu-programmer/dfu-programmer 
$MIRROR_DIR/$PREFIX/$BIN_DIR/dfu-programmer
 }
 
+# Install the lasts firmware from SVN
 packFirmwares () {
     echo "-- Packing firmwares"
     echo "Firmwares version : " >> $MIRROR_DIR/$PREFIX/$VER_FILE 
@@ -272,6 +283,40 @@
     cp $TEMP_DIR/firmware/* $MIRROR_DIR/$PREFIX/$FIRMWARE_DIR
 }
 
+# Compile tux_wifi_avoidance from SVN
+wifiAvoidance () {
+    echo "-- Compiling the wifi avoidance software"
+    mkdir tmp
+    svn export --force \
+    
http://svn.tuxisalive.com/software_suite_v2/software/tux_wifi_channel/trunk tmp
+    cd tmp
+    make -f Makefile.unix
+    cd -
+    cp tmp/tux_wifi_channel $MIRROR_DIR/$PREFIX/$BIN_DIR/tux_wifi_channel
+    rm -r tmp
+}
+
+# Install the idleBehavior from SVN
+packIdleBehavior () {
+    echo "Packing Idle Behavior"
+    mkdir /tmp/idle_behavior
+    svn export --force \
+        
http://svn.tuxisalive.com/software_suite_v2/software/http_server_resources/idle_behavior/trunk
 /tmp/idle_behavior
+    cp /tmp/idle_behavior/ResourceTuxIdle.py 
$MIRROR_DIR/$PREFIX/$SERVER_DIR/resources
+    mkdir $MIRROR_DIR/$PREFIX/$ATTITUNES_DIR/idleBehaviors
+    wget \
+    
http://www.kysoh.com/download/resources/idle_behavior_deps/linux/$VERSION_TXT
+    FILE=`cat $VERSION_TXT`
+    DIR=`sed s/.tar.gz//g $VERSION_TXT`
+    rm $VERSION_TXT
+    wget http://www.kysoh.com/download/resources/idle_behavior_deps/linux/$FILE
+    tar -xvf $FILE
+    cp $DIR/* $MIRROR_DIR/$PREFIX/$ATTITUNES_DIR/idleBehaviors/
+    rm -r /tmp/idle_behavior
+    rm -rf $DIR $FILE
+}
+
+# Install Acapela shared library from local FS
 packShared () {
     echo "-- Copying shared libs"
     mkdir -p $MIRROR_DIR/opt
@@ -282,53 +327,26 @@
     cp -r build_deps/common/libs/* $MIRROR_DIR/$PREFIX/$LIB_ACAP
 }
 
-packCCDeps () {
-    echo "-- Copying control center dependencies"
-    wget -q $CC_DEPS_URL/$VERSION_TXT
-    FILE=`cat $VERSION_TXT`
-    wget -q $CC_DEPS_URL/$FILE
-    tar -xf $FILE
-    rm $FILE
-    FILE=`sed s/.tar.gz//g $VERSION_TXT`
-    cp $FILE/* $MIRROR_DIR/$PREFIX/$CC_DEPS_DIR
-    rm -rf $VERSION_TXT $FILE
-}
-
-packCC () {
-    echo "-- Downloading the last ControlCenter"
-    wget -q $CC_URL/$VERSION_TXT
-    FILE=`cat $VERSION_TXT`
-    wget -q $CC_URL/$FILE
-    cp $FILE $MIRROR_DIR/$PREFIX/$CC_DIR/controlcenter.jar
-    chmod 777 $MIRROR_DIR/$PREFIX/$CC_DIR/controlcenter.jar
-    rm -rf $VERSION_TXT $FILE
-}
-
+# Install the updater from local FS
 packUpdater () {
     echo "-- Copying the gadget updater"
     sed "s;PREFIX=;PREFIX=$PREFIX;g" build_deps/common/updater/tux_updater\
     >$MIRROR_DIR/$PREFIX/$UPDATER_DIR/tux_updater
 }
 
-packJavaSkin () {
-    echo "-- Copying the java themepack"
-    wget -q $SKIN_URL/$VERSION_TXT
-    FILE=`cat $VERSION_TXT`
-    wget -q $SKIN_URL/$FILE
-    cp $FILE $MIRROR_DIR/$PREFIX/$MISC_DIR
-    rm $VERSION_TXT $FILE
-}
-
+# Install the templates from local FS
 packTemplates () {
     echo "-- Copying templates files"
     cp build_deps/common/templates/* $MIRROR_DIR/$PREFIX/$TEMPLATES_DIR
 }
 
+# Install the pixmaps from local FS
 packPixmaps () {
     echo "-- Copying pixmaps"
     cp build_deps/common/pixmaps/* $MIRROR_DIR/$PREFIX/$PIXMAP_DIR
 }
 
+# Create tuxsh binary
 tuxshBin () {
     echo "-- Creating tuxsh"
     echo "#!/bin/bash" >$MIRROR_DIR/$PREFIX/$BIN_DIR/tuxsh
@@ -337,18 +355,7 @@
     chmod +x $MIRROR_DIR/$PREFIX/$BIN_DIR/tuxsh
 }
 
-wifiAvoidance () {
-    echo "-- Compiling the wifi avoidance software"
-    mkdir tmp
-    svn export --force \
-    
http://svn.tuxisalive.com/software_suite_v2/software/tux_wifi_channel/trunk tmp
-    cd tmp
-    make -f Makefile.unix
-    cd -
-    cp tmp/tux_wifi_channel $MIRROR_DIR/$PREFIX/$BIN_DIR/tux_wifi_channel
-    rm -r tmp
-}
-
+# Create the server binary
 serverBin () {
     echo "-- Creating server binary"
     echo "#!/bin/bash" >$MIRROR_DIR/$PREFIX/$BIN_DIR/tuxhttpserver
@@ -357,6 +364,7 @@
     chmod +x $MIRROR_DIR/$PREFIX/$BIN_DIR/tuxhttpserver
 }
 
+# Create the control center binary
 ccBin () {
     echo "-- Creating control center binary"
     echo "#!/bin/bash" >$MIRROR_DIR/$PREFIX/$BIN_DIR/tux_control_center
@@ -365,6 +373,7 @@
     chmod +x $MIRROR_DIR/$PREFIX/$BIN_DIR/tux_control_center
 }
 
+# Create the updater binary
 updaterBin () {
     echo "-- Creating tux_updater binary"
     echo "#!/bin/bash" >$MIRROR_DIR/$PREFIX/$BIN_DIR/tux_updater
@@ -373,12 +382,38 @@
     chmod +x $MIRROR_DIR/$PREFIX/$BIN_DIR/tux_updater
 }
 
-createUsrDir () {
-    echo "Creating /usr directory"
-    mkdir -p $MIRROR_DIR/usr
-    cp -rf build_deps/common/launcher/* $MIRROR_DIR/usr/
+packCCDeps () {
+    echo "-- Copying control center dependencies"
+    wget -q $CC_DEPS_URL/$VERSION_TXT
+    FILE=`cat $VERSION_TXT`
+    wget -q $CC_DEPS_URL/$FILE
+    tar -xf $FILE
+    rm $FILE
+    FILE=`sed s/.tar.gz//g $VERSION_TXT`
+    cp $FILE/* $MIRROR_DIR/$PREFIX/$CC_DEPS_DIR
+    rm -rf $VERSION_TXT $FILE
 }
 
+packCC () {
+    echo "-- Downloading the last ControlCenter"
+    wget -q $CC_URL/$VERSION_TXT
+    FILE=`cat $VERSION_TXT`
+    wget -q $CC_URL/$FILE
+    cp $FILE $MIRROR_DIR/$PREFIX/$CC_DIR/controlcenter.jar
+    chmod 777 $MIRROR_DIR/$PREFIX/$CC_DIR/controlcenter.jar
+    rm -rf $VERSION_TXT $FILE
+}
+
+
+packJavaSkin () {
+    echo "-- Copying the java themepack"
+    wget -q $SKIN_URL/$VERSION_TXT
+    FILE=`cat $VERSION_TXT`
+    wget -q $SKIN_URL/$FILE
+    cp $FILE $MIRROR_DIR/$PREFIX/$MISC_DIR
+    rm $VERSION_TXT $FILE
+}
+
 packGadgets () {
     echo "Packing gadgets"
     wget -q -r -l 2 -A txt $GADGET_URL/common/
@@ -425,24 +460,6 @@
     rm -rf /tmp/$FILE $DIR
 }
 
-packIdleBehavior () {
-    echo "Packing Idle Behavior"
-    mkdir /tmp/idle_behavior
-    svn export --force \
-        
http://svn.tuxisalive.com/software_suite_v2/software/http_server_resources/idle_behavior/trunk
 /tmp/idle_behavior
-    cp /tmp/idle_behavior/ResourceTuxIdle.py 
$MIRROR_DIR/$PREFIX/$SERVER_DIR/resources
-    mkdir $MIRROR_DIR/$PREFIX/$ATTITUNES_DIR/idleBehaviors
-    wget \
-    
http://www.kysoh.com/download/resources/idle_behavior_deps/linux/$VERSION_TXT
-    FILE=`cat $VERSION_TXT`
-    DIR=`sed s/.tar.gz//g $VERSION_TXT`
-    rm $VERSION_TXT
-    wget http://www.kysoh.com/download/resources/idle_behavior_deps/linux/$FILE
-    tar -xvf $FILE
-    cp $DIR/* $MIRROR_DIR/$PREFIX/$ATTITUNES_DIR/idleBehaviors/
-    rm -r /tmp/idle_behavior
-    rm -rf $DIR $FILE
-}
 
 ####### DEBIAN SPECIFIC ########
 createDebianDir () {
@@ -451,6 +468,11 @@
     echo "" >$BUILD_DIR/DEBIAN/conffiles
 }
 
+packDebInitScript () {
+    mkdir $MIRROR_DIR/$ETC_DIR/init.d
+    cp build_deps/deb/init/tuxhttpserver $MIRROR_DIR/$ETC_DIR/init.d
+}
+
 createControlFileDeb () {
     echo "-- Creating the control file"
     echo "Package: Tuxsetup" >$CONTROL
@@ -634,11 +656,12 @@
 fi
 
 echo "Creating $TYPE package with version $VERSION from $SOURCE"
-
+# create the file aerchitecture --->
 createTemp
 createUsrDir
 createEtcDir
 createBaseDir
+# <--- Download stuff from SVN --->
 packServer
 packPythAPI
 if [[ ! -z $COMPAT ]]; then
@@ -648,22 +671,27 @@
 packJavaAPI
 compTuxup
 packFirmwares
+wifiAvoidance
+# <--- Copy files from local directory --->
+packUpdater
 packShared
+packTemplates
+packPixmaps
+# <--- Download file from the ftp serveur --->
+ftpUpdate
 packCC
 packCCDeps
 packUpdater
 packJavaSkin
-packTemplates
-packPixmaps
+packGadgets
+packTools
+packAttitunes
+packIdleBehavior
+# <--- Create executables --->
 serverBin
 tuxshBin
-wifiAvoidance
 ccBin
 updaterBin
-packGadgets
-packTools
-packAttitunes
-packIdleBehavior
 
 case $TYPE in 
     deb)


-------------------------------------------------------------------------
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