Handle nix
cache properly
This commit is contained in:
parent
b5c1fbb935
commit
646c340bbd
1 changed files with 7 additions and 4 deletions
|
@ -15,12 +15,15 @@ begin
|
|||
|
||||
function installNixPkgs -V config -V nixPkgsDir
|
||||
source "$config"
|
||||
downloadNixPkgs
|
||||
mkdir -p "$nixPkgsDir"
|
||||
cp -r "$nixPkgsCache"/* "$nixPkgsDir"
|
||||
|
||||
if [ ! -d "$nixPkgsCache" ]
|
||||
downloadNixPkgs
|
||||
mkdir -p "$nixPkgsDir"
|
||||
cp -r "$nixPkgsCache"/* "$nixPkgsDir"
|
||||
end
|
||||
end
|
||||
|
||||
function uninstallNixPkgs -V nixPkgsDir
|
||||
rm -rf "$nixPkgsDir"
|
||||
rm -rf (dirname "$nixPkgsDir")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue