Browse code

Delete version

Stefan Höhn authored on07/09/2020 16:51:39 • GitHub committed on07/09/2020 16:51:39
Showing1 changed files

1 1
deleted file mode 100755
... ...
@@ -1,206 +0,0 @@
1
-#! /bin/bash 
2
-
3
-ver="v0.3.3"
4
-
5
-# note: replace - with _ in tool name. e.g. pkg-config -> tools_pkg_config
6
-# script will sanitize the input the same way
7
-
8
-tools_alacritty=-V
9
-tools_apt=-v
10
-tools_arduino=--version
11
-tools_audacious=-v
12
-tools_autoconf=--version
13
-tools_automake=--version
14
-tools_awk=--version
15
-tools_bash=--version
16
-tools_borg=-V
17
-tools_brew=--version
18
-tools_bundle=-v
19
-tools_bundler=-v
20
-tools_cargo=--version
21
-tools_carthage=version
22
-tools_ccmake=--version
23
-tools_cheese=--version
24
-tools_clang=--version
25
-tools_clisp=--version
26
-tools_cmake=--version
27
-tools_code=--version
28
-tools_coffee=-v
29
-tools_conky=-v
30
-tools_convert=--version
31
-tools_crystal=-v
32
-tools_ctags=--version
33
-tools_curl=--version
34
-tools_direnv=version
35
-tools_docker=-v
36
-tools_dotnet=--version
37
-tools_elixir=-v
38
-tools_elm=--version
39
-tools_eog=--version
40
-tools_exa=-v
41
-tools_expac=--version
42
-tools_ffmpeg=-version
43
-tools_flac=-v
44
-tools_firefox=-v
45
-tools_fish=-v
46
-tools_fzf=--version
47
-tools_gcc=--version
48
-tools_gdb=--version
49
-tools_gedit=--version
50
-tools_gem=-v
51
-tools_ghc=--version
52
-tools_gimp=-version
53
-tools_git=--version
54
-tools_gitkraken=--version
55
-tools_go=version
56
-tools_gradle=--version
57
-tools_grep=-V
58
-tools_guake=--version
59
-tools_haxe=-version
60
-tools_haxelib=version
61
-tools_heroku=-v
62
-tools_htop=-v
63
-tools_inkscape=--version
64
-tools_java=-version
65
-tools_javac=-version
66
-tools_julia=-v
67
-tools_kodi=-v
68
-tools_kotlin=-version
69
-tools_lame=-v
70
-tools_libreoffice=--version
71
-tools_love=--version
72
-tools_lua=-v
73
-tools_magick=--version
74
-tools_make=-v
75
-tools_man=--version
76
-tools_meld=--version
77
-tools_mousepad=-v
78
-tools_mpv=--version
79
-tools_nano=--version
80
-tools_nautilus=--version
81
-tools_ncdu=-v
82
-tools_node=-v
83
-tools_nokogiri=-v
84
-tools_nordvpn=-v
85
-tools_npm=-v
86
-tools_npx=-v
87
-tools_nvim=-version
88
-tools_pacman=--version
89
-tools_pamac=--version
90
-tools_perl=-v
91
-tools_pip3=-V
92
-tools_pip=-V
93
-tools_pkg_config=--version
94
-tools_python2=-V
95
-tools_python3=-V
96
-tools_python=-V
97
-tools_rake=--version
98
-tools_ranger=--version
99
-tools_rbenv=-v
100
-tools_restic=version
101
-tools_rg=-V
102
-tools_rofi=-v
103
-tools_rome=--version
104
-tools_rsync=--version
105
-tools_rubocop=-v
106
-tools_ruby=-v
107
-tools_rustc=--version
108
-tools_samba=--version
109
-tools_scalac=-version
110
-tools_screen=-v
111
-tools_sed=--version
112
-tools_sidekiq=--version
113
-tools_slack=-v
114
-tools_snap=--version
115
-tools_ssh=-V
116
-tools_swift=-version
117
-tools_thefuck=-v
118
-tools_thunar=--version
119
-tools_tmux=-V
120
-tools_tsc=-v
121
-tools_valgrind=--version
122
-tools_version=-v
123
-tools_vi=-version
124
-tools_viewnior=--version
125
-tools_vim=-version
126
-tools_virt_manager=--version
127
-tools_vlc=--version
128
-tools_wget=--version
129
-tools_xrandr=-v
130
-tools_xsel=--version
131
-tools_yarn=version
132
-tools_zsh=--version
133
-
134
-
135
-
136
-
137
-# User forgot to specify the program or a flag
138
-if [ -z $1 ]
139
-then
140
-  echo "Usage: version <program>"
141
-  exit
142
-fi
143
-
144
-# Display help
145
-if [ $1 == -h ]
146
-then
147
-  echo "version displays the versions of programs you have installed."
148
-  echo ""
149
-  echo "Usage:"
150
-  echo "  version <program>    display version of program"
151
-  echo "                       (if known and installed)"
152
-  echo "  version -h           display this help"
153
-  echo "  version -l           display a list of known programs"
154
-  echo "  version -c           display count of known programs"
155
-  echo "  version -v           display version of version"
156
-  echo "                       (yes, 'version version' also works!)"
157
-  exit
158
-fi
159
-
160
-# Display recognized program count
161
-if [ $1 == -c ]
162
-then
163
-  count=$(egrep -o "^tools_" $(which version) | wc -l)
164
-  echo "I know how to find the versions of $count programs!"
165
-  exit
166
-fi
167
-
168
-# Display version of version
169
-if [ $1 == -v ]
170
-then
171
-  echo "version $ver"
172
-  exit
173
-fi
174
-
175
-# Display all the tools we know
176
-if [ $1 == -l ]
177
-then
178
-  egrep -o "^tools_[^=]*" $(which version) | grep -oP "tools_\K(.*)"
179
-  exit
180
-fi
181
-
182
-sanitized=${1//[-]/_}
183
-tool=tools_$sanitized
184
-version_arg=${!tool}
185
-
186
-# do we know about this program?
187
-if [ -z $version_arg ]
188
-then
189
-  echo "I don't know how to find the version of '$1'."
190
-  echo "If you figure it out, let me know at https://github.com/bit101/version"
191
-  exit
192
-fi 
193
-
194
-# display the correct command for the user
195
-echo "Command: $1 $version_arg"
196
-
197
-# does the user have this program installed?
198
-if ! command -v $1 &> /dev/null
199
-then
200
-  echo "But '$1' does not seem to be installed"
201
-  exit
202
-fi
203
-
204
-# success. make the call to display the version.
205
-$1 $version_arg
206
-