-
Notifications
You must be signed in to change notification settings - Fork 4
install module.sh ( setup )
Alex Ameen edited this page Jan 23, 2023
·
2 revisions
install-module.sh - manual page for install-module.sh 0.1.0
install-module.sh [/OPTIONS/] FROM NM-DIR
Module rooted at FROM ( as FROM/package.json ), will be installed to
NM-DIR/<NAME> symlinking any executables to NM-DIR/.bin.
- -t,–to
- Treat
NM-DIRas literal install dir - -i,–ident ID
- Treat
IDas the package identifier/name - -b,–bins
- Force processing of bins
- -B,–no-bins
- Skip processing bins
- -p,–perms
- Force fixing of
FROMpermissions for dirs and bins - -P,–no-perms
- Skip checking of
FROMpermissions, copy them “as is” - -s,–patch
- Force patching shebangs
- -S,–no-patch
- Skip patching shebangs
- -l,–bin-links
- Force creation of executable symlinks
- -L,–no-bin-links
- Skip creation of executable symlinks
- -u,–usage
- Print usage message to STDOUT
- -h,–help
- Print this message to STDOUT
- -V,–version
- Print version to STDOUT
The following environment variables may be used unless explicitly overridden by options/flags mentioned above. These variables are not required, but may be used as an optimization to skip reading the contents of
package.json.Variables marked as “Bool” are treated as false when unset or set to the empty string, or true for any non-empty value. Flags will always take priority over environment variables.
- IDENT
- Treat
IDENTas the package identifier/name. - NO_BINS
- Skip processing of bins if non-empty. ( Bool )
- BIN_PAIRS
- Space separated tuples of executables to be installed as:
BIN-NAME,REL-PATH BIN-NAME2,REL-PATH... - BIN_DIR
- Relative path to directory containing scripts to be
installed as executables ( drops any extension for exposed bin ). This
variable is ignored if
BIN_PAIRSis non-empty. - NO_BIN_LINKS
- Skip creation of executable symlinks. ( Bool )
- NO_PERMS
- Skip checking/fixup of directory and executable permissions when non-empty. ( Bool )
- NO_PATCH
- Skip patching shebangs in scripts when non-empty. ( Bool )
- NODEJS
- Absolute path to
nodeexecutable. May be omitted if patching shebangs is disabled. - JQ
- Absolute path to
jqexecutable. May be omitted ifIDENTis known and any*BIN*variable is is non-empty ( it is only needed to readpackage.json). - ID
- Absolute path to
idexecutable. - CHMOD
- Absolute path to
chmodexecutable. - CHOWN
- Absolute path to
chownexecutable. - MKDIR
- Absolute path to
mkdirexecutable. - CP
- Absolute path to
cpexecutable. This is useful for adding additional flags or wrapping the program used to copy files. - LN
- Absolute path to
lnexecutable. - REALPATH
- Absolute path to
realpathexecutable. - TAIL
- Absolute path to
tailexecutable. - FIND
- Absolute path to
findexecutable. - BASH
- Absolute path to
bashexecutable.