File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change 1
- irods_server_version() {
2
- python -c "import irods.helpers as h
3
- import operator,sys
4
- if len(sys.argv) == 1:
5
- (comparison,relto)=('','')
6
- elif len(sys.argv) == 3:
7
- (comparison,relto)=sys.argv[1:3]
8
- fm_tuple = lambda tup: '.'.join(str(_) for _ in tup)
9
- to_tuple = lambda vstr: tuple(int(_) for _ in vstr.split('.'))
10
- svt = h.make_session().server_version_without_auth()
11
- if relto:
12
- exit(0 if vars(operator)[comparison](svt,to_tuple(relto)) else 1)
13
- print(fm_tuple(svt))
14
- " $1 $2
15
- }
16
-
17
1
SCRIPTDIR=${BASH_SOURCE[0]}
18
2
up_from_script_dir() {
19
3
local x incr=""
@@ -221,3 +205,19 @@ mtime_and_content()
221
205
stat -c%y "$1"
222
206
cat "$1"
223
207
}
208
+
209
+ irods_server_version() {
210
+ python -c "import irods.helpers as h
211
+ import operator,sys
212
+ if len(sys.argv) == 1:
213
+ (comparison,relto)=('','')
214
+ elif len(sys.argv) == 3:
215
+ (comparison,relto)=sys.argv[1:3]
216
+ fm_tuple = lambda tup: '.'.join(str(_) for _ in tup)
217
+ to_tuple = lambda vstr: tuple(int(_) for _ in vstr.split('.'))
218
+ svt = h.make_session().server_version_without_auth()
219
+ if relto:
220
+ exit(0 if vars(operator)[comparison](svt,to_tuple(relto)) else 1)
221
+ print(fm_tuple(svt))
222
+ " $1 $2
223
+ }
You can’t perform that action at this time.
0 commit comments