-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.rb
executable file
·89 lines (81 loc) · 1.93 KB
/
install.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env ruby
puts "Okay, let's make your terminal a bit more hipsta.\n\n"
bin_dir = (`pwd`.delete!("\n") + "/bin")
Dir.mkdir(bin_dir) unless File.exists?(bin_dir)
emojis = [
# System
["bless", "🙌"],
["cal", "📅"],
["cat", "🐈"],
["cd", "💿"],
["chat", "💬"],
["clear", "🆑"],
["date", "💑"],
["exit", "🚪"],
["fax", "📠"],
["find", "🔍"],
["finger", "🖕"],
["fold", "🙏"],
["free", "🆓"],
["grep", "🍇", "--color=auto"],
["groups", "👪"],
["head", "🤕"],
["kill", "🗡"],
["locate", "📍"],
["look", "👀"],
["login", "🔑"],
["mail", "📬"],
["man", "👨"],
["mount", "⛰"],
["open", "🔓"],
["ping", "🏓"],
["port", "🚢"],
["puma", "😾"],
["read", "📖"],
["rm", "💩"],
["say", "👄"],
["screen", "📺"],
["shift", "🔄"],
["size", "📏"],
["sleep", "💤"],
["swift", "🏃"],
["tie", "👔"],
["time", "⏰"],
["toe", "👣"],
["top", "🔝"],
["touch", "👉"],
["units", "📐"],
["wait", "⏱"],
["wc", "🚽"],
["what", "🤔"],
["whoami", "🤷"],
["yes", "👍"],
["zip", "🤐"],
# User
["atom", "⚛"],
["brew", "🍺"],
["grunt", "🐗"],
["java", "☕"],
["psql", "🐘"],
["python", "🐍"],
["rails", "🛤"],
["ruby", "💎"],
["spring", "♨️"],
["unicorn", "🦄"],
]
emojis.each do | item |
found = (`which #{item[0]}` != "")
if found
file_path = "#{bin_dir}/#{item[1]}"
File.open(file_path, 'w') do | file |
file.write(
"#!/usr/bin/env bash\n\n" +
"#{item[0]} \"$@\" #{item[2]}\n"
)
`chmod +x #{file_path}`
puts "#{item[1]} mapped to #{item[0]}"
end
end
end
puts "\nDone."
puts "The last step is to add #{bin_dir} to your $PATH."