aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2022-08-29 22:05:46 +0200
committerMartin Polden <mpolden@mpolden.no>2022-08-29 22:05:46 +0200
commitf9c5b25394f96f04209db8986eb6c04154677ce1 (patch)
treeda52110454491a14e2d0ad1087fa4c3c13f6c89f
parentac26d72f1afb8634cd8a281dd5300084fce87f52 (diff)
makefile: check for existing symlink
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3ecb60b..900179f 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ iterm2.conf:
# regular file. When changing iTerm2 config, save it in General -> Preferences
# manually. This will replace the symlink with a regular file, so this target
# should be run again.
- test -f $(ITERM2_PLIST) && cp -a $(ITERM2_PLIST) $(CURDIR)/iterm2.conf || true
+ test -f $(ITERM2_PLIST) -a ! -L $(ITERM2_PLIST) && cp -a $(ITERM2_PLIST) $(CURDIR)/iterm2.conf || true
test -e $(CURDIR)/$@ && ln $(LN_FLAGS) $(CURDIR)/$@ $(ITERM2_PLIST)
install: $(symlinks) iterm2.conf