mirror of
https://github.com/fsquillace/junest.git
synced 2026-01-23 02:34:30 +00:00
Merge 87abc9b819 into 0037f96e15
This commit is contained in:
commit
dd242c57fa
7 changed files with 72 additions and 0 deletions
25
pkgs/bin-wrapper/PKGBUILD
Normal file
25
pkgs/bin-wrapper/PKGBUILD
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Maintainer: Jonathon Fernyhough <jonathon at+manjarodotorg>
|
||||
|
||||
pkgname=bin-wrapper
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Automatically wrap JuNest executables for use in outer system's PATH"
|
||||
arch=(any)
|
||||
url="https://github.com/fsquillace/junest"
|
||||
license=(GPL)
|
||||
source=(create-wrapper
|
||||
delete-wrapper
|
||||
junest-wrapper
|
||||
create-wrapper.hook
|
||||
delete-wrapper.hook)
|
||||
sha256sums=('0b9d2fe31fee1d514295399fade8ae178d8c6fcc918e81286084337cfd900663'
|
||||
'46ecdd2404e6bf8310e02fcfd8e0690405d52ce07b82dff2f0c9cbad31e40f67'
|
||||
'f27807aae86daec311d601b1b954be1ee274232f9416963449514a2b00b34b83'
|
||||
'ed6ce2ab02368427aab12d3aa36e2b1741cca526bd4caf55a90687bb117ea358'
|
||||
'3a08a9c2889d9cb97fc2a53a5e045372477fde7261b0cbda1c332cd0c4ec1b1f')
|
||||
|
||||
package() {
|
||||
install -Dm644 -t "$pkgdir"/usr/lib/libalpm/hooks *.hook
|
||||
install -Dm644 -t "$pkgdir"/usr/share/doc/bin-wrapper README
|
||||
install -D -t "$pkgdir"/wrappers *-wrapper
|
||||
}
|
||||
14
pkgs/bin-wrapper/README
Normal file
14
pkgs/bin-wrapper/README
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
This set of scripts and hooks will trigger pacman to create a wrapper script
|
||||
for any executable installed under /usr/bin/. The wrapper will be removed when
|
||||
the executable is removed.
|
||||
|
||||
This will allow you to place $JUNEST_HOME/wrappers in your $PATH and use any
|
||||
JuNest-installed application transparently, including the use of a desktop
|
||||
launcher.
|
||||
|
||||
The wrapper script targets the default (ns) JuNest back-end and will bind to
|
||||
any locations specified by a $JUNEST_BINDS environment variable, e.g.:
|
||||
|
||||
export JUNEST_BINDS="--bind /media /media"
|
||||
|
||||
You will have to export $JUNEST_HOME as normal. junest must be on your $PATH.
|
||||
4
pkgs/bin-wrapper/create-wrapper
Executable file
4
pkgs/bin-wrapper/create-wrapper
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/bash
|
||||
while read input; do
|
||||
[[ -n "$input" ]] && /usr/bin/ln -sf junest-wrapper /wrappers/$(/usr/bin/basename "$input")
|
||||
done
|
||||
10
pkgs/bin-wrapper/create-wrapper.hook
Normal file
10
pkgs/bin-wrapper/create-wrapper.hook
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Trigger]
|
||||
Operation = Install
|
||||
Operation = Upgrade
|
||||
Type = Path
|
||||
Target = usr/bin/?*
|
||||
[Action]
|
||||
Description = Create/Update JuNest wrapper
|
||||
When = PostTransaction
|
||||
Exec = /wrappers/create-wrapper
|
||||
NeedsTargets
|
||||
4
pkgs/bin-wrapper/delete-wrapper
Executable file
4
pkgs/bin-wrapper/delete-wrapper
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/bash
|
||||
while read input; do
|
||||
[[ -n "$input" ]] && /usr/bin/rm -f /wrappers/$(/usr/bin/basename "$input")
|
||||
done
|
||||
9
pkgs/bin-wrapper/delete-wrapper.hook
Normal file
9
pkgs/bin-wrapper/delete-wrapper.hook
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[Trigger]
|
||||
Operation = Remove
|
||||
Type = Path
|
||||
Target = usr/bin/?*
|
||||
[Action]
|
||||
Description = Remove JuNest wrapper
|
||||
When = PostTransaction
|
||||
Exec = /wrappers/delete-wrapper
|
||||
NeedsTargets
|
||||
6
pkgs/bin-wrapper/junest-wrapper
Executable file
6
pkgs/bin-wrapper/junest-wrapper
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
declare args
|
||||
[[ $@ ]] && args=$(printf " %q" "$@")
|
||||
|
||||
exec junest ns -n -b "$JUNEST_BINDS" -- /usr/bin/$(/usr/bin/basename $0) $args
|
||||
Loading…
Add table
Add a link
Reference in a new issue