Author: ks156
Date: 2009-03-13 15:29:08 +0100 (Fri, 13 Mar 2009)
New Revision: 4056

Added:
   
software_suite_v2/tuxware/installers/unix/branches/refactoring/software_updater/installer.sh
Log:
* Added an installer for the software updater


Added: 
software_suite_v2/tuxware/installers/unix/branches/refactoring/software_updater/installer.sh
===================================================================
--- 
software_suite_v2/tuxware/installers/unix/branches/refactoring/software_updater/installer.sh
                                (rev 0)
+++ 
software_suite_v2/tuxware/installers/unix/branches/refactoring/software_updater/installer.sh
        2009-03-13 14:29:08 UTC (rev 4056)
@@ -0,0 +1,67 @@
+#!/bin/bash
+#===============================================================================
+#
+#          FILE:  installer.sh
+# 
+#         USAGE:  ./installer.sh 
+# 
+#   DESCRIPTION:  
+# 
+#       OPTIONS:  ---
+#  REQUIREMENTS:  ---
+#          BUGS:  ---
+#         NOTES:  ---
+#        AUTHOR:  Paul Rathgeb (), [email protected]
+#       COMPANY:  
+#       VERSION:  1.0
+#       CREATED:  03/13/2009 02:49:22 PM CET
+#      REVISION:  ---
+#===============================================================================
+# Create build dir
+mkdir $1
+
+# Create the install file
+echo "#!/bin/bash
+[ -d \$1 ] && [[ -d \$1/uninstall ]] && /bin/bash \$1/uninstall.sh \$1
+[ -d \$1 ] || mkdir -p \$1
+cp -r $1/* \$1
+[ -d \$2/bin ] || mkdir -p \$2/bin
+[ -d \$2/bin/tux_updater ] && rm \$2/bin/tux_updater
+echo \"#!/bin/bash\" > \$2/bin/tux_updater
+echo \"python \$3/tux_software_updater.py \\\$*\" >> \$2/bin/tux_updater
+chmod +x \$2/bin/tux_updater" >> $1/install.sh
+
+# Export the software updater
+svn export -q "$(svn info |grep URL |sed 's/URL: //g')" $1/$1
+
+cd $1/$1
+[ -f installer.sh ] && rm installer.sh
+
+# Create the uninstall script
+echo "" > uninstall.sh
+str=""
+for file in `find . -type f`; do
+    str="$str
+    rm \$1/$file"
+done
+echo "#!/bin/bash
+$str
+for file in \`find \$1 -iname '*.pyc'\`; do
+    rm \$file
+done 
+find \$1 -type d > flist
+tac flist | while read line; do
+    if [ ! \"\$(ls -A \$line)\" ]; then
+        rm -r \$line
+    fi
+done
+rm flist" >> uninstall.sh
+
+cd - >/dev/null
+
+# Create tarball
+rev=`svn info |grep "Last Changed Rev"`
+rev=${rev##* }
+tar -czf $1.tar.gz $1
+mv $1.tar.gz $1-$rev.tar.gz
+rm -r $1


Property changes on: 
software_suite_v2/tuxware/installers/unix/branches/refactoring/software_updater/installer.sh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/x-sh
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to