diff --git a/bin/freight-cache b/bin/freight-cache index f1d78a6..71cf195 100755 --- a/bin/freight-cache +++ b/bin/freight-cache @@ -78,9 +78,12 @@ LIB="$(cd "$(dirname "$(dirname "$0")")/lib/freight" && pwd)" # If `GPG_DIGEST_ALGO` is unset, force it to the freight default of SHA512 [ -z "$GPG_DIGEST_ALGO" ] && GPG_DIGEST_ALGO="SHA512" -# Create a working directory on the same device as the Freight cache. +# make sure the cache-directory exists mkdir -p "$VARCACHE" -TMP="$(mktemp -d "$VARCACHE/work.$$.XXXXXXXXXX")" + +# Create a temporary working directory for extracting files +mkdir -p "$TEMPDIR" +TMP="$(mktemp -d "$TEMPDIR/work.$$.XXXXXXXXXX")" # shellcheck disable=SC2064 trap "rm -rf \"$TMP\"" EXIT INT TERM diff --git a/bin/freight-init b/bin/freight-init index 867d74e..97e7360 100755 --- a/bin/freight-init +++ b/bin/freight-init @@ -2,11 +2,12 @@ # Initialize a Freight directory (similar to git init). -#/ Usage: freight init -g [--libdir=] [--cachedir=] [--archs=] [--origin=] [--label=