Missing addTextToStore function.

This commit is contained in:
Ben Radford committed 2023-07-20 10:42:39 +01:00
1 parent d1c77b201a
commit 44f855d14e
1 file changed
+9
+9
View File
@@ -59,3 +59,12 @@ initLowerStore () {
execUnshare () {
exec unshare --mount --map-root-user "$SHELL" "$@"
}
addTextToStore() {
storeDir=$1; shift
filename=$1; shift
content=$1; shift
filePath="$TEST_HOME/$filename"
echo "$content" > "$filePath"
nix-store --store "$storeDir" --add "$filePath"
}