whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [1/1] Commit 37f00ac: Show commands
Date Fri, 01 Apr 2016 16:15:31 GMT
Commit 37f00ac818831c219ce17fb435a05c31e5a23806:
    Show commands
    Add commands


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@apache.org>

------------------------------------------------------------
www/test.cgi                                                 | +++++++++++ ----
------------------------------------------------------------
15 changes: 11 additions, 4 deletions.
------------------------------------------------------------


diff --git a/www/test.cgi b/www/test.cgi
index 3797ab9..6ec2f42 100755
--- a/www/test.cgi
+++ b/www/test.cgi
@@ -15,14 +15,21 @@ ENV.sort.each do |k,v|
   print "#{k} #{v}\n"
 end
 
+def puts_system(*cmd)
+  puts ['$', cmd].join ' '
+  system *cmd
+end
+
 # Optional extra info (from the main script only)
 query = ENV['QUERY_STRING'] || ARGV[0]
 if query and not query.empty? and ENV['SCRIPT_URL'] == '/test.cgi'
     print "\n"
-    system('which','-a','ruby')
-    system('which','-a','ruby2.3.0')
-    system('ruby','-v')
-    system('gem','env')
+    puts_system('which','-a','ruby')
+    puts_system('which','-a','ruby2.3.0')
+    puts_system('ruby','-v')
+    puts_system('gem','env')
+    puts_system('service puppet status')
+    puts_system('git ls-remote origin master')
     wait=query.match(/^sleep=(\d+)$/)[1].to_i rescue 0
     if wait > 0
       print "\nWaiting #{wait} seconds ..."

Mime
View raw message