aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-12-21 09:55:35 +0000
committermerakor <cem@ckyln.com>2020-12-21 09:55:35 +0000
commit1535d115d8d0c58ca4a90acbf16b263cf85bb0a1 (patch)
tree37f27b092a695b745aaa1014ee7c80af542b0ab8
parent263daddaa753ecc2aa7fc202d0bb1acbe8f43f74 (diff)
parent14233491c517f1d6e2456d29b35ae99db76a23ac (diff)
downloadcpt-1535d115d8d0c58ca4a90acbf16b263cf85bb0a1.tar.gz
Merge branch 'master' into redoredo
FossilOrigin-Name: 242ef9adb08b706d0d45a500ef95aaa32860e4119cb1715a981c9a87c5f29843
-rw-r--r--src/cpt-lib.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 6045e22..a8fac5c 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1763,10 +1763,12 @@ create_cache() {
#
# Create the required temporary directories and set the variables
# which point to them.
- 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}"
+ mkdir -p "${tmp_dir:=${CPT_TMPDIR:=$cac_dir/proc}/$pid}"
+
+ # If an argument is given, skip the creation of other cache directories
+ [ "$1" ] || mkdir -p "${mak_dir:=$tmp_dir/build}" \
+ "${pkg_dir:=$tmp_dir/pkg}" \
+ "${tar_dir:=$tmp_dir/export}"
}