cpt

Carbs Packaging Tools
git clone git://git.carbslinux.org/cpt
Log | Files | Refs | README | LICENSE

commit 31d220feee0a27daf2c5afaab86862ea0cf2a248
parent 261be3a7e9c0eb79bb1a6236ac2284a0cbdb4370
Author: Cem Keylan <cem@ckyln.com>
Date:   Fri,  7 Aug 2020 14:36:43 +0300

cpt-lib: move non-temporary cache directory creation back to main()

Diffstat:
Msrc/cpt-lib | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/cpt-lib b/src/cpt-lib @@ -1433,20 +1433,25 @@ create_cache() { # # Create the required temporary directories and set the variables # which point to them. - mkdir -p "${cac_dir:=${CPT_CACHE:=${XDG_CACHE_HOME:-$HOME/.cache}/cpt}}" \ - "${CPT_TMPDIR:=$cac_dir}" \ + mkdir -p "${CPT_TMPDIR:=$cac_dir}" \ "${mak_dir:=$CPT_TMPDIR/build-$pid}" \ "${pkg_dir:=$CPT_TMPDIR/pkg-$pid}" \ "${tar_dir:=$CPT_TMPDIR/extract-$pid}" \ - "${src_dir:=$cac_dir/sources}" \ - "${log_dir:=$cac_dir/logs}" \ - "${bin_dir:=$cac_dir/bin}" } main() { set -ef + # Create the cache directories for CPT and set the variables which point + # to them. This is seperate from temporary directories created in + # create_cache(). That's because we need these variables set on most + # occasions. + mkdir -p "${cac_dir:=${CPT_CACHE:=${XDG_CACHE_HOME:-$HOME/.cache}/cpt}}" \ + "${src_dir:=$cac_dir/sources}" \ + "${log_dir:=$cac_dir/logs}" \ + "${bin_dir:=$cac_dir/bin}" + # Die here if the user has no set CPT_PATH. This is a rare occurance # as the environment variable should always be defined. [ "$CPT_PATH" ] || die "\$CPT_PATH needs to be set"