]> Zhao Yanbai Git Server - minix.git/commitdiff
Only install /usr/bin/vi as a hardlink to elvis if there's nothing already
authorBen Gras <ben@minix3.org>
Wed, 31 Jan 2007 13:00:39 +0000 (13:00 +0000)
committerBen Gras <ben@minix3.org>
Wed, 31 Jan 2007 13:00:39 +0000 (13:00 +0000)
there (so e.g. nvi isn't overwritten).

commands/elvis/Makefile

index 1f1ab0e9b63b3ad3134110b0ff619e8e12184993..17c36bfc85766f10debcbf2120dd7ee629235bd8 100755 (executable)
@@ -71,8 +71,10 @@ install:     /usr/bin/elvis \
 /bin/elvis:    elvis
        install -cs -o bin elvis $@
 
-/usr/bin/vi:   elvis
-       install -cs -o bin elvis $@
+/usr/bin/vi:   /usr/bin/elvis
+       if [ ! -f $@ -a ! -s $@ ];      \
+       then    install -l $? $@ ;      \
+       fi
 
 /usr/bin/ctags:        ctags
        install -cs -o bin ctags $@