add jq
[webi-installers/.git] / jq / install.sh
diff --git a/jq/install.sh b/jq/install.sh
new file mode 100644 (file)
index 0000000..1bb6cf0
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    set -e
+    set -u
+
+    ##############
+    # Install jq #
+    ##############
+
+    WEBI_SINGLE=true
+
+    pkg_get_current_version() {
+      # 'jq --version' has output in this format:
+      #       jq-1.6
+      # This trims it down to just the version number:
+      #       1.6
+      echo $(jq --version 2>/dev/null | head -n 1 | sed 's:^jq-::')
+    }
+}