]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Add revive (#91)
authorLayerex <layerex@dismail.de>
Thu, 9 Jun 2022 13:35:38 +0000 (16:35 +0300)
committerGitHub <noreply@github.com>
Thu, 9 Jun 2022 13:35:38 +0000 (15:35 +0200)
programs/revive.json [new file with mode: 0644]

diff --git a/programs/revive.json b/programs/revive.json
new file mode 100644 (file)
index 0000000..9fcd350
--- /dev/null
@@ -0,0 +1,10 @@
+{
+    "files": [
+        {
+            "path": "$HOME/revive.toml",
+            "movable": true,
+            "help": "Providing path to config file via _--config_ (_-config_) flag is supported.\n\nMove config file to _\"$XDG_CONFIG_HOME\"/revive/revive.toml_ and place this shell script with name \"revive\" to some directory in _\"$PATH\"_, preceding _/usr/bin/_ (I suggest _\"$HOME\"/.local/bin/_ or _/usr/local/bin/_):\n```sh\n#!/usr/bin/env sh\n\nCONFIG_FILE_PATH=\"$XDG_CONFIG_HOME\"/revive/revive.toml\n\nconfig_arg_set() {\n    for arg in \"$@\"\n    do\n        case \"$arg\" in\n            -config*|--config*)\n                return 0\n                ;;\n            --)\n                return 1\n        esac\n    done\n    return 1\n}\n\nif config_arg_set \"$@\"\nthen\n    /usr/bin/revive \"$@\"\nelse\n    /usr/bin/revive --config=\"$CONFIG_FILE_PATH\" \"$@\"\nfi\n```"
+        }
+    ],
+    "name": "revive"
+}