aboutsummaryrefslogtreecommitdiff
path: root/src/cpt-lib
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-11-11 12:05:47 +0000
committermerakor <cem@ckyln.com>2020-11-11 12:05:47 +0000
commit5609ba32e5065af6baa14b2f94fc5104c64ceb31 (patch)
tree39a48189c904e7da63288a5b7d4c4eb26dfc08d4 /src/cpt-lib
parentc10e49d9caf08d0729024f5cf770634a739ebbe3 (diff)
downloadcpt-5609ba32e5065af6baa14b2f94fc5104c64ceb31.tar.gz
create_cache(): create multi-level temporary directories per process
FossilOrigin-Name: 89e024bc50ae14880135de6279580f2e9da3a1e2dcb58fc43f83a9f012bdb060
Diffstat (limited to 'src/cpt-lib')
-rw-r--r--src/cpt-lib8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpt-lib b/src/cpt-lib
index 9cd3d2d..4161fcf 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -1767,10 +1767,10 @@ create_cache() {
#
# Create the required temporary directories and set the variables
# which point to them.
- mkdir -p "${CPT_TMPDIR:=$cac_dir}" \
- "${mak_dir:=$CPT_TMPDIR/build-$pid}" \
- "${pkg_dir:=$CPT_TMPDIR/pkg-$pid}" \
- "${tar_dir:=$CPT_TMPDIR/extract-$pid}" \
+ mkdir -p "${CPT_TMPDIR:=$cac_dir/proc}" \
+ "${mak_dir:=$CPT_TMPDIR/$pid/build}" \
+ "${pkg_dir:=$CPT_TMPDIR/$pid/pkg}" \
+ "${tar_dir:=$CPT_TMPDIR/$pid/export}"
}