mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
docs: update lib example
This commit is contained in:
parent
51ab39562b
commit
aed8f82b37
1 changed files with 13 additions and 10 deletions
23
modules.md
23
modules.md
|
|
@ -54,18 +54,21 @@ This is not the default as there is no general way to know its value and depends
|
||||||
|
|
||||||
If you installed the module with `cargo install`, the binary will be placed in `bin` subdirectory under Cargo's home which should be in the `PATH` anyway. Cargo has no option to place in subdirectories with other names.
|
If you installed the module with `cargo install`, the binary will be placed in `bin` subdirectory under Cargo's home which should be in the `PATH` anyway. Cargo has no option to place in subdirectories with other names.
|
||||||
|
|
||||||
The following snippet is what I used to package for Arch Linux package, adding a `_PR_LIB` declaration along with initialization. The script is `/usr/bin/pay-respects` and the actual executable is located somewhere else.
|
The following snippet is what I have included into Arch Linux package's with workflows binaries, adding a `_PR_LIB` declaration along with initialization. The script is `/usr/bin/pay-respects` and the actual executable is located somewhere else.
|
||||||
```sh
|
```sh
|
||||||
#!/bin/sh
|
``#!/bin/sh
|
||||||
if [ "$#" -gt 1 ]; then
|
if [ "$#" -gt 1 ]; then
|
||||||
SHELL=$(basename $SHELL)
|
if [ -z "$_PR_LIB" ]; then
|
||||||
if [ "$SHELL" = "fish" ]; then
|
SHELL=$(basename $SHELL)
|
||||||
echo "set -x _PR_LIB /usr/lib/pay-respects:$HOME/.local/lib/pay-respects"
|
LIB="/usr/lib/pay-respects"
|
||||||
elif [ "$SHELL" = "nu" ]; then
|
if [ "$SHELL" = "nu" ]; then
|
||||||
echo "env:_PR_LIB=/usr/lib/pay-respects:$HOME/.local/lib/pay-respects"
|
echo "env:_PR_LIB=$LIB"
|
||||||
else
|
elif [[ "$SHELL" = "pwsh" ]]; then
|
||||||
echo "_PR_LIB=/usr/lib/pay-respects:$HOME/.local/lib/pay-respects"
|
echo "\$env:_PR_LIB=\"$LIB\""
|
||||||
|
else
|
||||||
|
echo "export _PR_LIB=$LIB"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
/opt/pay-respects/bin/pay-respects "$@"
|
/opt/pay-respects/bin/pay-respects "$@"
|
||||||
```
|
`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue