Skip to content

Commit

Permalink
Pass -P to cp to preserve symlinks
Browse files Browse the repository at this point in the history
This is commonly the default behavior with -R, but POSIX leaves the
default unspecified.
  • Loading branch information
michaelforney committed Dec 22, 2019
1 parent c84c843 commit 10414d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/install-nix-from-closure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ for i in $(cd "$self/store" >/dev/null && echo ./*); do
rm -rf "$i_tmp"
fi
if ! [ -e "$dest/store/$i" ]; then
cp -Rp "$self/store/$i" "$i_tmp"
cp -RPp "$self/store/$i" "$i_tmp"
chmod -R a-w "$i_tmp"
chmod +w "$i_tmp"
mv "$i_tmp" "$dest/store/$i"
Expand Down

0 comments on commit 10414d4

Please sign in to comment.