r1805 - trunk/src/host/qemu-neo1973/openmoko

andrew at sita.openmoko.org andrew at sita.openmoko.org
Thu Apr 19 11:07:57 CEST 2007


Author: andrew
Date: 2007-04-19 11:07:56 +0200 (Thu, 19 Apr 2007)
New Revision: 1805

Modified:
   trunk/src/host/qemu-neo1973/openmoko/flash.sh
Log:
Avoid "stat" in scripts as it doesn't even pretend to be cross-platform
(see BSD), and "gstat" is too risky.


Modified: trunk/src/host/qemu-neo1973/openmoko/flash.sh
===================================================================
--- trunk/src/host/qemu-neo1973/openmoko/flash.sh	2007-04-19 08:24:51 UTC (rev 1804)
+++ trunk/src/host/qemu-neo1973/openmoko/flash.sh	2007-04-19 09:07:56 UTC (rev 1805)
@@ -44,7 +44,8 @@
 most_recent () {
 	cd $src_dir
 	export $2="`basename \`ls -d -1 $img_dir/$1 | sort | tail -n 1\``"
-	export $3="`python -c \"print hex(\`stat -c %s $img_dir/${!2}\`)\"`"
+	export $3="`python -c \"import os; print hex(\
+		os.stat('$img_dir/${!2}').st_size)\"`"
 	cd $script_dir
 	[ -e "${!2}" ] || ln -sf $img_dir/${!2} ${!2}
 	[ -n "${!3}" ]





More information about the commitlog mailing list