mirror of
https://github.com/NixOS/nix
synced 2025-07-03 14:31:46 +02:00
Missing addTextToStore function.
This commit is contained in:
parent
d1c77b201a
commit
44f855d14e
1 changed files with 9 additions and 0 deletions
|
@ -59,3 +59,12 @@ initLowerStore () {
|
||||||
execUnshare () {
|
execUnshare () {
|
||||||
exec unshare --mount --map-root-user "$SHELL" "$@"
|
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"
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue