Skip to content

Commit

Permalink
Use /usr/bin/env for ruby shabang
Browse files Browse the repository at this point in the history
find . -type f -print0 | xargs -0 sed -e 's/\/usr\/bin\/ruby/\/usr\/bin\/env ruby/'

So can work with multiple ruby environment on dev box, default ruby on my devbox(ubuntu14.04)
is 1.9, and lkp server inn is using 2.1, so installed rvm to install additional ruby.

But with hardcoded /usr/bin/ruby, it's still running into default ruby 1.9

Signed-off-by: Yao Weiqi <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
  • Loading branch information
Yao Weiqi authored and Fengguang Wu committed May 2, 2015
1 parent c4e1572 commit bb306ec
Show file tree
Hide file tree
Showing 99 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion bin/dump-yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'yaml'
require 'pp'
Expand Down
2 changes: 1 addition & 1 deletion bin/expand-job
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion bin/job-path
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion bin/run-job
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

# The job file is essentially grouped lists of commands to be executed with
# optional environment parameters.
Expand Down
2 changes: 1 addition & 1 deletion bin/run-local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'optparse'
require 'ostruct'
Expand Down
2 changes: 1 addition & 1 deletion bin/setup-local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'optparse'
require 'ostruct'
Expand Down
2 changes: 1 addition & 1 deletion bin/yaml-to-shell-vars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'yaml'
require 'shellwords'
Expand Down
2 changes: 1 addition & 1 deletion lib/bounds.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

def is_valid_stats_range(stats_field, num)
monitor = stats_field.split('.')[0]
Expand Down
2 changes: 1 addition & 1 deletion lib/distro-info.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

module LKP

Expand Down
2 changes: 1 addition & 1 deletion lib/dmesg.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require "fileutils"
require "tempfile"
Expand Down
2 changes: 1 addition & 1 deletion lib/git.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'set'
require 'time'
Expand Down
2 changes: 1 addition & 1 deletion lib/install.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

def get_dependency_packages(distro, script)
file = "#{LKP_SRC}/distro/#{distro}/#{script}"
Expand Down
2 changes: 1 addition & 1 deletion lib/job.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC ||= ENV['LKP_SRC']
LKP_SERVER ||= 'inn'
Expand Down
2 changes: 1 addition & 1 deletion lib/job2sh.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

SHELL_BLOCK_KEYWORDS = {
'if' => [ 'then', 'fi' ],
Expand Down
2 changes: 1 addition & 1 deletion lib/matrix.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

MAX_MATRIX_COLS = 100

Expand Down
2 changes: 1 addition & 1 deletion lib/plot.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC ||= ENV['LKP_SRC']

Expand Down
2 changes: 1 addition & 1 deletion lib/result.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

RESULT_MNT = '/result'
RESULT_PATHS = '/lkp/paths'
Expand Down
2 changes: 1 addition & 1 deletion lib/statistics.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby
#
# https://www.bcg.wisc.edu/webteam/support/ruby/standard_deviation

Expand Down
2 changes: 1 addition & 1 deletion lib/stats.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

MARGIN_SHIFT = 5
MAX_RATIO = 5
Expand Down
2 changes: 1 addition & 1 deletion lib/yaml.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC ||= ENV['LKP_SRC']

Expand Down
2 changes: 1 addition & 1 deletion lkp-exec/ruby
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC ||= ENV['LKP_SRC']

Expand Down
2 changes: 1 addition & 1 deletion lkp-exec/stat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion sbin/compare
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby
# encoding: utf-8

Signal.trap("INT") { exit! }
Expand Down
2 changes: 1 addition & 1 deletion sbin/dump-stat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

RESULT_ROOT = ENV['RESULT_ROOT']
LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname(File.realpath($PROGRAM_NAME)))
Expand Down
2 changes: 1 addition & 1 deletion sbin/extract-result-stats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby
#
# This is a simplified version of extract-stats + stats/wrapper.
# It could potentially be expanded to replace extract-stats.
Expand Down
2 changes: 1 addition & 1 deletion sbin/filter-job
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)
ENV["LKP_SRC"] ||= LKP_SRC
Expand Down
2 changes: 1 addition & 1 deletion sbin/job2sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

TMP = ENV['TMP'] || '/tmp'
LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)
Expand Down
2 changes: 1 addition & 1 deletion sbin/mmplot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion sbin/mplot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion sbin/split-job
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion sbin/unite-params
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

MAX_COLS = 100

Expand Down
2 changes: 1 addition & 1 deletion sbin/unite-stats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV["LKP_SRC"] || File.dirname(File.dirname File.realpath $PROGRAM_NAME)

Expand Down
2 changes: 1 addition & 1 deletion sbin/update-printk-error-messages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'optparse'
require 'ostruct'
Expand Down
2 changes: 1 addition & 1 deletion stats/autotest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'yaml'

Expand Down
2 changes: 1 addition & 1 deletion stats/boot-meminfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

while line = STDIN.gets
case line.chomp!
Expand Down
2 changes: 1 addition & 1 deletion stats/boot-memory
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

RESULT_ROOT = ENV['RESULT_ROOT']

Expand Down
2 changes: 1 addition & 1 deletion stats/boot-slabinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

STDIN.gets
STDIN.gets
Expand Down
2 changes: 1 addition & 1 deletion stats/boot-time
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

def show_dmesg_times
dmesg = "#{ENV['RESULT_ROOT']}/dmesg"
Expand Down
2 changes: 1 addition & 1 deletion stats/cpuidle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require ENV['LKP_SRC'] + "/lib/statistics.rb"

Expand Down
2 changes: 1 addition & 1 deletion stats/dd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

while line = STDIN.gets
case line
Expand Down
2 changes: 1 addition & 1 deletion stats/diskstats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

keys = %w(read_ios read_merges read_sectors read_ticks
write_ios write_merges write_sectors write_ticks
Expand Down
2 changes: 1 addition & 1 deletion stats/dmesg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

LKP_SRC = ENV['LKP_SRC'] || File.dirname(File.dirname(File.realpath($0)))
require "#{LKP_SRC}/lib/dmesg.rb"
Expand Down
2 changes: 1 addition & 1 deletion stats/ebizzy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require ENV['LKP_SRC'] + "/lib/statistics.rb"

Expand Down
2 changes: 1 addition & 1 deletion stats/energy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

time = []
counts = {}
Expand Down
2 changes: 1 addition & 1 deletion stats/fileio
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

while line = STDIN.gets
case line
Expand Down
2 changes: 1 addition & 1 deletion stats/fsmark
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require ENV['LKP_SRC'] + "/lib/statistics.rb"

Expand Down
2 changes: 1 addition & 1 deletion stats/ftq
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require ENV['LKP_SRC'] + "/lib/statistics.rb"

Expand Down
2 changes: 1 addition & 1 deletion stats/ftrace
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'fileutils'
require 'yaml'
Expand Down
2 changes: 1 addition & 1 deletion stats/glbenchmark
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

while line = STDIN.gets
case line
Expand Down
2 changes: 1 addition & 1 deletion stats/hackbench
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

time = 0.0
kb = 0
Expand Down
2 changes: 1 addition & 1 deletion stats/interrupts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'set'

Expand Down
2 changes: 1 addition & 1 deletion stats/iostat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby
#example input:
#04/02/2013 10:42:02 AM
#avg-cpu: %user %nice %system %iowait %steal %idle
Expand Down
2 changes: 1 addition & 1 deletion stats/iozone
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

keys = %w(write rewrite read reread random_read random_write
bkwd_read record_rewrite stride_read fwrite frewrite
Expand Down
2 changes: 1 addition & 1 deletion stats/iperf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'json'

Expand Down
2 changes: 1 addition & 1 deletion stats/kernel-size
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require 'yaml'

Expand Down
2 changes: 1 addition & 1 deletion stats/kernel_selftests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require ENV['LKP_SRC'] + "/lib/statistics.rb"
require 'set'
Expand Down
2 changes: 1 addition & 1 deletion stats/ku-latency
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

while line = STDIN.gets
case line.chomp!
Expand Down
2 changes: 1 addition & 1 deletion stats/latency_stats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

$hits = Hash.new { |hash, key| hash[key] = 0 }
$sum = Hash.new { |hash, key| hash[key] = 0 }
Expand Down
2 changes: 1 addition & 1 deletion stats/linpack
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

while line = STDIN.gets
case line
Expand Down
2 changes: 1 addition & 1 deletion stats/lock_stat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

exit unless STDIN.gets =~ /lock_stat version 0.[34]/
exit unless STDIN.gets =~ /---------------------/
Expand Down
2 changes: 1 addition & 1 deletion stats/ltp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

RESULT_ROOT = ENV['RESULT_ROOT']

Expand Down
2 changes: 1 addition & 1 deletion stats/memmap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

total = {}
while line = STDIN.gets
Expand Down
2 changes: 1 addition & 1 deletion stats/mountstats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

$xprt = Hash.new

Expand Down
2 changes: 1 addition & 1 deletion stats/nepim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

tcp_key = %w(kbps_in kbps_out rcv_s snd_s)
udp_key = %w(kbps_in kbps_out rcv_s snd_s loss ooo LOST)
Expand Down
2 changes: 1 addition & 1 deletion stats/netperf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

$throughput=0
$line=0
Expand Down
2 changes: 1 addition & 1 deletion stats/netpipe
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/ruby
#!/usr/bin/env ruby

require ENV['LKP_SRC'] + "/lib/statistics.rb"

Expand Down
Loading

0 comments on commit bb306ec

Please sign in to comment.