Author: ks156
Date: 2009-03-11 16:03:14 +0100 (Wed, 11 Mar 2009)
New Revision: 3955
Added:
software_suite_v2/tuxware/installers/unix/branches/refactoring/firmware_installer.sh
Log:
* Added a script to pack the firmware, tuxup and dfu-programmer
Added:
software_suite_v2/tuxware/installers/unix/branches/refactoring/firmware_installer.sh
===================================================================
---
software_suite_v2/tuxware/installers/unix/branches/refactoring/firmware_installer.sh
(rev 0)
+++
software_suite_v2/tuxware/installers/unix/branches/refactoring/firmware_installer.sh
2009-03-11 15:03:14 UTC (rev 3955)
@@ -0,0 +1,79 @@
+#!/bin/bash
+#===============================================================================
+#
+# FILE: install.sh
+#
+# USAGE: ./install.sh
+#
+# DESCRIPTION:
+#
+# OPTIONS: ---
+# REQUIREMENTS: ---
+# BUGS: ---
+# NOTES: ---
+# AUTHOR: Paul Rathgeb (), [email protected]
+# COMPANY:
+# VERSION: 1.0
+# CREATED: 03/09/2009 11:12:41 AM CET
+# REVISION: ---
+#===============================================================================
+mkdir $1
+echo "#!/bin/bash" >> $1/install.sh
+echo '[ -d $1 ] && [[ -d $1/uninstall ]] && /bin/bash $1/uninstall.sh $1' >>
$1/install.sh
+echo '[ -d $1 ] || mkdir -p $1' >> $1/install.sh
+cmd="cp -r $1/* "' $1'
+echo "$cmd" >> $1/install.sh
+echo 'cp tuxup $2/bin/tuxup' >> $1/install.sh
+echo 'chmod +x $2/bin/tuxup' >> $1/install.sh
+echo 'cp dfu-programmer $2/bin/dfu-programmer' >> $1/install.sh
+echo 'chmod +x $2/bin/dfu-programmer' >> $1/install.sh
+REPO=http://svn.tuxisalive.com/firmware/hex/tags/0.9.1
+svn export -q $REPO $1/$1
+cd $1/$1
+echo "#!/bin/bash" > uninstall.sh
+echo "" >> uninstall.sh
+echo '# Remove previously installed files' >> uninstall.sh
+for file in `find . -type f`; do
+ echo 'rm $1/'"$file" >> uninstall.sh
+done
+echo "" >> uninstall.sh
+echo "# Find python compiled files " >> uninstall.sh
+echo 'for file in `find $1 -iname "*.pyc"`; do' >> uninstall.sh
+echo ' rm $1/$file' >> uninstall.sh
+echo 'done' >> uninstall.sh
+echo "" >> uninstall.sh
+echo '# Check for empty dirs' >> uninstall.sh
+echo 'find $1 -type d > flist' >> uninstall.sh
+echo 'tac flist |' >> uninstall.sh
+echo 'while read line; do' >> uninstall.sh
+echo ' if [ ! "$(ls -A $line)" ]; then' >> uninstall.sh
+echo ' rm -r $line' >> uninstall.sh
+echo ' fi' >> uninstall.sh
+echo 'done' >> uninstall.sh
+echo 'rm flist' >> uninstall.sh
+echo "" >> uninstall.sh
+echo "# Remove the root directory if it's empty" >> uninstall.sh
+cd - >/dev/null
+rev=`svn info $REPO |grep "Last Changed Rev"`
+rev=${rev##* }
+# Pack dfu-programmer
+wget \
+http://kent.dl.sourceforge.net/sourceforge/dfu-programmer/dfu-programmer-0.5.1.tar.gz
-O /tmp/dfu.tar.gz
+tar -xvf /tmp/dfu.tar.gz -C /tmp/
+cd /tmp/dfu*
+./configure; make
+pwd=`pwd`
+cd -
+cp $pwd/src/dfu-programmer $1
+rm -rf /tmp/dfu*
+
+svn export -q \
+http://svn.tuxisalive.com/firmware/tuxup/unix/trunk tuxup
+cd tuxup
+make
+cp tuxup ../$1
+cd -
+rm -r tuxup
+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/firmware_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