mkSymlinkActivationScript: add overall check for existence of source
This commit is contained in:
1 file changed
+2
@@ -12,10 +12,12 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
mkSymlinkActivationScript = {target, source}: ''
|
mkSymlinkActivationScript = {target, source}: ''
|
||||||
|
if [ -e ${source} ]; then
|
||||||
if [ -e ${target} ]; then
|
if [ -e ${target} ]; then
|
||||||
rm -rf ${target}
|
rm -rf ${target}
|
||||||
fi
|
fi
|
||||||
ln -s ${source} ${target}
|
ln -s ${source} ${target}
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
attrByStrPath = strPath: set: nixpkgs.lib.attrByPath (nixpkgs.lib.strings.splitString "." strPath) null set;
|
attrByStrPath = strPath: set: nixpkgs.lib.attrByPath (nixpkgs.lib.strings.splitString "." strPath) null set;
|
||||||
|
|||||||
Reference in new issue
Block a user