aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-12-27 16:10:17 +0000
committermerakor <cem@ckyln.com>2020-12-27 16:10:17 +0000
commit4ef8e3c0630a8cf8ab1a0809eaa12c56210240d6 (patch)
treebbf1d54648c4fee68a9234bef4117d3ed82bdd80
parent8936b063a7ddc9459cc4b3f8b6f46f296106c98d (diff)
downloadcpt-4ef8e3c0630a8cf8ab1a0809eaa12c56210240d6.tar.gz
cpt-lib: define package directory variables
FossilOrigin-Name: 88d0b950d6498af268a365b0cfa50f462f2116acb26720013f34a203f1f83ccc
-rw-r--r--src/cpt-lib.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 2af31fb..daecf30 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1917,6 +1917,17 @@ create_cache() {
colory="\033[1;33m" colorb="\033[1;36m" colre="\033[m"
fi
+ # Set default package directories so that they can be parsed from package
+ # helpers
+ # TODO Document
+ : "${CPT_PKG_PREFIX:=/usr}" \
+ "${CPT_PKG_ETCDIR:=/etc}" \
+ "${CPT_PKG_BINDIR:=$CPT_PKG_PREFIX/bin}" \
+ "${CPT_PKG_SBINDIR:=$CPT_PKG_PREFIX/bin}" \
+ "${CPT_PKG_MANDIR:=/usr/share/man}" \
+ "${CPT_PKG_INFODIR:=/usr/share/info}" \
+ "${CPT_PKG_LOCALSTATEDIR:=/var}"
+
}
# If the library is being called with its own name, run arguments.