Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 9 insertions, 1 deletions
-rwxr-xr-xmake10
diff --git a/make b/make
index e9ee9c3..ae424fe 100755
--- a/make
+++ b/make
@@ -19,6 +19,7 @@ then
exit 1
fi
+no_overwrite=
# __merge_link <.FILES_DIR> <HOME_DIR>
__merge_link() {
while read -r f
@@ -48,6 +49,12 @@ __merge_link() {
# replace output file with (link to) current
if ! cmp -s "$1/$f" "$2/$f"
then
+ if [ -n "$no_overwrite" ]
+ then
+ echo "Warn: '$2/$f' is different from '$1/$f', skipping (./make safe_link is being executed)!" >/dev/stderr
+ continue
+ fi
+
if [ -h "$2/$f" ]
then
real="$(readlink "$2/$f")"
@@ -276,5 +283,6 @@ case "$1" in
(import) import "$@" ;;
(export) export_ "$@" ;;
(unlink) unlink ;;
- (link|*) link ;;
+ (link) link ;;
+ (safe_link|sink|*) no_overwrite=yes; link ;;
esac