Skip to content

Commit 463b5bc

Browse files
committed
move irods_server_version function to end
1 parent ca39de2 commit 463b5bc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

irods/test/scripts/test_support_functions

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
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-
171
SCRIPTDIR=${BASH_SOURCE[0]}
182
up_from_script_dir() {
193
local x incr=""
@@ -221,3 +205,19 @@ mtime_and_content()
221205
stat -c%y "$1"
222206
cat "$1"
223207
}
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+
}

0 commit comments

Comments
 (0)