-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathexample.sh
More file actions
23 lines (18 loc) · 839 Bytes
/
example.sh
File metadata and controls
23 lines (18 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# Example eMerger plugin. Copy to ~/.config/emerger/managers.d/<slug>.sh
# and edit. The slug below becomes the manager name shown by eMerger.
PM_PLUGIN_SLUG=example
pm_example_detect() {
# Return 0 if the tool is installed on this system.
command -v example-tool >/dev/null 2>&1
}
pm_example_needs_sudo() { return 1; } # remove or flip to 0 if sudo is needed
pm_example_parallel() { return 0; } # safe to run concurrently with others
pm_example_dev() { return 1; } # return 0 to gate under --dev
pm_example_icon() { printf '\xf0\x9f\x94\x8c'; } # plug emoji
pm_example_run() {
# Use run_cmd so --dry-run, --verbose, retry, logging all work.
run_cmd "example refresh" example-tool refresh || return 1
run_cmd "example upgrade" example-tool upgrade -y || return 1
return 0
}