Cleanup script used to generate debian packages
authorEduardo Lima (Etrunko) <eblima@gmail.com>
Thu, 1 Jul 2010 19:13:34 +0000 (16:13 -0300)
committerEduardo Lima (Etrunko) <eblima@gmail.com>
Tue, 10 Aug 2010 01:12:30 +0000 (22:12 -0300)
Signed-off-by: Eduardo Lima (Etrunko) <eblima@gmail.com>

trunk/scripts/gen-deb-src.sh

index 292506b..c7e3057 100755 (executable)
@@ -1,12 +1,19 @@
 #!/bin/bash
 
-E_BASE_REPO="http://svn.enlightenment.org/svn/e/trunk"
-E_PYTHON_REPO="$E_BASE_REPO/BINDINGS/python"
-E_SVN_REV="41533"
+E_BASE_REPO="http://svn.enlightenment.org/svn/e"
+E_TRUNK_REPO="$E_BASE_REPO/trunk"
+E_OLD_REPO="$E_BASE_REPO/OLD"
+E_PYTHON_SUFIX="BINDINGS/python"
+E_PYTHON_REPO="$E_TRUNK_REPO/$E_PYTHON_SUFIX"
+E_OLD_PYTHON_REPO="$E_OLD_REPO/$E_PYTHON_SUFIX"
+E_PROTO_REPO="$E_TRUNK_REPO/PROTO"
+
+[ -z $E_SVN_REV ] && E_SVN_REV="44144"
 
 TMP_DIR="maemo-efl-deb-src-$E_SVN_REV"
 VERSIONS_DIR="$TMP_DIR/versions"
 
+# C Modules
 ALL_MODULES=("eina"
              "eet"
              "evas"
@@ -16,18 +23,24 @@ ALL_MODULES=("eina"
              "epsilon"
              "etk"
              "e_dbus"
-             "efl-core"
-             "python-evas"
-             "python-ecore"
-             "python-edje"
-             "python-epsilon"
-             "python-etk"
-             "python-e_dbus"
-             "python-efl_utils"
-             "python-efl-core")
-
-ALL_MODULES+=("elementary"
-              "python-elementary")
+             "emotion"
+             "epdf"
+             "ethumb"
+             "libeweather"
+             "elementary"
+             "efl-core")
+
+# Python Bindings
+ALL_MODULES+=("python-evas"
+              "python-ecore"
+              "python-edje"
+              "python-epsilon"
+              "python-etk"
+              "python-e_dbus"
+              "python-ethumb"
+              "python-efl_utils"
+              "python-elementary"
+              "python-efl-core")
 
 MAEMO_REV="maemo1"
 MAEMO_REPO="extras-devel"
@@ -55,12 +68,32 @@ checkout_repositories(){
     for module in ${ALL_MODULES[@]};do
         echo -n "      $module"
 
-               REPO=$E_BASE_REPO
+        case $module in
+            etk|epsilon)
+                REPO="$E_OLD_REPO"
+                ;;
+            python-etk|python-epsilon)
+                REPO="$E_OLD_PYTHON_REPO"
+                ;;
+            elementary)
+                REPO="$E_BASE_REPO/TMP/st"
+                ;;
+            epdf|libeweather)
+                REPO="$E_PROTO_REPO"
+                ;;
+            *efl-core)
+                cp -r $module $TMP_DIR > /dev/null 2>&1 && echo " ... OK" || exit_error
+                continue
+                ;;
+            python-*)
+                REPO="$E_PYTHON_REPO"
+                ;;
+            *)
+                REPO=$E_BASE_REPO
+                ;;
+        esac
+
                REV="-r$E_SVN_REV "
-               echo -n $module | grep elementary > /dev/null 2>&1 && REPO="$E_BASE_REPO/TMP/st"
-               echo -n $module | grep ethumb > /dev/null 2>&1 && REPO="$E_BASE_REPO/PROTO"
-               echo -n $module | grep python > /dev/null 2>&1 && REPO=$E_PYTHON_REPO
-               echo -n $module | grep efl-core > /dev/null 2>&1 && cp -r $module $TMP_DIR && echo " ... OK" && continue
 
         echo -n " ."
         svn co $REV $REPO/$module $TMP_DIR/$module > /dev/null 2>&1 || exit_error
@@ -80,13 +113,19 @@ checkout_repositories(){
 update_changelogs(){
        echo "Updating changelogs ..."
     for module in ${ALL_MODULES[@]};do
-        echo -n "      $module "
-
-        echo -n $module | grep -v python | grep -v efl-core > /dev/null 2>&1 && VERSION=`grep AC_INIT $TMP_DIR/$module/configure.ac | cut -d[ -f3 | cut -d] -f1 || exit_error`
-        echo -n "."
-        echo -n $module | grep python | grep -v efl-core > /dev/null 2>&1 && VERSION=`grep version $TMP_DIR/$module/setup.py | cut -d\' -f2 || exit_error`
-        echo -n "."
-        echo -n $module | grep efl-core > /dev/null 2>&1 && VERSION=`grep AC_INIT $TMP_DIR/evas/configure.ac | cut -d[ -f3 | cut -d] -f1 || exit_error`
+        echo -n "      $module .."
+
+        case $module in
+            *efl-core)
+                VERSION=`grep AC_INIT $TMP_DIR/evas/configure.ac | cut -d[ -f3 | cut -d] -f1 || exit_error`
+                ;;
+            python-*)
+                VERSION=`grep version $TMP_DIR/$module/setup.py | cut -d\' -f2 || exit_error`
+                ;;
+            *)
+                VERSION=`grep AC_INIT $TMP_DIR/$module/configure.ac | cut -d[ -f3 | cut -d] -f1 || exit_error`
+                ;;
+        esac
 
         echo -n "."
         dch --force-distribution -b -c $TMP_DIR/$module/debian/changelog -v $VERSION+svn$E_SVN_REV-$MAEMO_REV -D $MAEMO_REPO "SVN snapshot release $E_SVN_REV" > /dev/null 2>&1 || exit_error