aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix/libexec
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-02-26 17:42:02 -0500
committerCarl Dong <contact@carldong.me>2021-04-05 19:13:54 -0400
commit44f6d4f56b16e1dc5e8a23318b8e7aad0665f178 (patch)
tree3f614a858548563330f9fd1a3c3ee60cb7c2c87d /contrib/guix/libexec
parent84912d4b24382ae022da3a863bd6caa2b8948d94 (diff)
downloadbitcoin-44f6d4f56b16e1dc5e8a23318b8e7aad0665f178.tar.xz
guix: Record precious directories and add guix-clean
Many users have reported problems that stem from having an unclean working tree. To that end, I've written a guix-clean script which should help reset the working tree while respecting user-specified precious directories. Precious directories, such as: - SOURCES_PATH - BASE_CACHE - SDK_PATH - OUTDIR Should be preserved when cleaning the working tree, and are thus recorded in ./contrib/guix/var/precious_dirs. The ./contrib/guix/guix-clean script is able to parse that file and make sure to avoid them when cleaning out the working tree.
Diffstat (limited to 'contrib/guix/libexec')
-rw-r--r--contrib/guix/libexec/prelude.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash
index 33a319012c..e6d3a5b722 100644
--- a/contrib/guix/libexec/prelude.bash
+++ b/contrib/guix/libexec/prelude.bash
@@ -58,3 +58,6 @@ VERSION_BASE="${version_base_prefix}${VERSION}" # TOP
DISTSRC_BASE="${DISTSRC_BASE:-${VERSION_BASE}}"
OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
+
+var_base_basename="var"
+VAR_BASE="${VAR_BASE:-${VERSION_BASE}/${var_base_basename}}"