Skip to content

Commit

Permalink
files: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvanderlinden committed Nov 14, 2024
1 parent 66ab55a commit b0316ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/files.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ let
mkdir -p "${dirOf filename}"
if [ -L "${filename}" ]
then
echo "Overwriting ${filename}"
ln -sf ${fileOption.file} "${filename}"
elif [ -f "${filename}" ]
then
echo "Conflicting file ${filename}" >&2
exit 1
else
echo "Creating ${filename}"
ln -s ${fileOption.file} "${filename}"
fi
'';
Expand Down

0 comments on commit b0316ff

Please sign in to comment.