fix mkLink bug (renew link)
This commit is contained in:
@ -17,11 +17,13 @@ rec {
|
|||||||
(lib.mkIf (!pred) do);
|
(lib.mkIf (!pred) do);
|
||||||
|
|
||||||
# Creates a symlink if it doesn't exist
|
# Creates a symlink if it doesn't exist
|
||||||
|
# If it exists renew the link
|
||||||
mkLink = src: dest:
|
mkLink = src: dest:
|
||||||
''
|
''
|
||||||
if [ ! -L "${dest}" ]; then
|
if [ -L "${dest}" ]; then
|
||||||
ln -sf ${src} ${dest}
|
rm ${dest}
|
||||||
fi
|
fi
|
||||||
|
ln -sf ${src} ${dest}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Removes a symlink if it exists
|
# Removes a symlink if it exists
|
||||||
|
Reference in New Issue
Block a user