Missing addTextToStore function.

This commit is contained in:
Ben Radford 2023-07-19 15:09:58 +01:00
parent d1c77b201a
commit 44f855d14e
No known key found for this signature in database
GPG Key ID: 9DF5D4640AB888D5

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"
}