Skip to content

install module.sh ( setup )

aameen-tulip edited this page Jan 23, 2023 · 2 revisions

NAME

install-module.sh - manual page for install-module.sh 0.1.0

SYNOPSIS

install-module.sh [OPTIONS] FROM NM-DIR

DESCRIPTION

Module rooted at FROM ( as FROM/package.json ), will be installed to NM-DIR/<NAME> symlinking any executables to NM-DIR/.bin.

OPTIONS

-t,–to
Treat NM-DIR as literal install dir
-i,–ident ID
Treat ID as the package identifier/name
-b,–bins
Force processing of bins
-B,–no-bins
Skip processing bins
-p,–perms
Force fixing of FROM permissions for dirs and bins
-P,–no-perms
Skip checking of FROM permissions, 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

ENVIRONMENT

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 IDENT as 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_PAIRS is 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 node executable. May be omitted if patching shebangs is disabled.
JQ
Absolute path to jq executable. May be omitted if IDENT is known and any *BIN* variable is is non-empty ( it is only needed to read package.json ).
ID
Absolute path to id executable.
CHMOD
Absolute path to chmod executable.
CHOWN
Absolute path to chown executable.
MKDIR
Absolute path to mkdir executable.
CP
Absolute path to cp executable. This is useful for adding additional flags or wrapping the program used to copy files.
LN
Absolute path to ln executable.
REALPATH
Absolute path to realpath executable.
TAIL
Absolute path to tail executable.
FIND
Absolute path to find executable.
BASH
Absolute path to bash executable.

Clone this wiki locally