[Swift-commit] r2923 - trunk/libexec
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Wed May 13 08:49:58 CDT 2009
Author: benc
Date: 2009-05-13 08:49:58 -0500 (Wed, 13 May 2009)
New Revision: 2923
Modified:
trunk/libexec/_swiftwrap
Log:
Check for existence of linuxy /proc files before catting them so that we get a more elegant error message in their absence.
Modified: trunk/libexec/_swiftwrap
===================================================================
--- trunk/libexec/_swiftwrap 2009-05-13 13:48:57 UTC (rev 2922)
+++ trunk/libexec/_swiftwrap 2009-05-13 13:49:58 UTC (rev 2923)
@@ -18,10 +18,14 @@
env 2>&1 >& "$INFO"
infosection "df"
df 2>&1 >& "$INFO"
- infosection "/proc/cpuinfo"
- cat /proc/cpuinfo 2>&1 >& "$INFO"
- infosection "/proc/meminfo"
- cat /proc/meminfo 2>&1 >& "$INFO"
+ if [ -e "/proc/cpuinfo" ]; then
+ infosection "/proc/cpuinfo"
+ cat /proc/cpuinfo 2>&1 >& "$INFO"
+ fi
+ if [ -e "/proc/meminfo" ]; then
+ infosection "/proc/meminfo"
+ cat /proc/meminfo 2>&1 >& "$INFO"
+ fi
infosection "command line"
echo $COMMANDLINE 2>&1 >& "$INFO"
if [ -f "$STDOUT" ] ; then
More information about the Swift-commit
mailing list