Skip to content

Commit 946ea5d

Browse files
committed
python plugin installer script - narrative comments
1 parent 3f863c2 commit 946ea5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

irods/test/harness/install_python_rule_engine

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,31 @@
22

33
python_rule_plugin_package_spec() {
44
local PKG=irods-rule-engine-plugin-python
5+
6+
# Grep pattern to filter plugin package names for those compatible with the target version of iRODS.
57
local search_str="+$IRODS_PACKAGE_VERSION"
68
if [ "$1" = "all" ]; then
79
search_str=""
810
fi
11+
12+
# Collect available version strings for the plugin for our iRODS server version.
913
local VERSIONS=$(apt list -a $PKG 2>/dev/null|\
1014
awk '{print $2}'|\
1115
grep '\w'|\
1216
grep "$(
1317
perl -e 'print quotemeta($ARGV[0])' "$search_str")"
1418
)
19+
20+
# Get the highest version number among the list in $VERSIONS
1521
local LATEST_VERSION=$(sort -V <<<"$VERSIONS" | tail -1)
22+
1623
if [ "$1" = "latest" ]; then
24+
# Output the appropriate format for apt install targets
1725
echo "$PKG=$LATEST_VERSION"
1826
else
1927
echo "$VERSIONS"
2028
fi
2129
}
2230

31+
# Download/install the latest Python Rule Engine plugin appropriate for the iRODS server we have installed.
2332
apt install -y "$(python_rule_plugin_package_spec latest)"

0 commit comments

Comments
 (0)