summaryrefslogtreecommitdiffstats
path: root/source/a/pkgtools/scripts/setup.vi-ex
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/pkgtools/scripts/setup.vi-ex')
-rw-r--r--source/a/pkgtools/scripts/setup.vi-ex27
1 files changed, 23 insertions, 4 deletions
diff --git a/source/a/pkgtools/scripts/setup.vi-ex b/source/a/pkgtools/scripts/setup.vi-ex
index f58c15e0c..f79ad91ee 100644
--- a/source/a/pkgtools/scripts/setup.vi-ex
+++ b/source/a/pkgtools/scripts/setup.vi-ex
@@ -11,7 +11,7 @@ as it is lightweight and supports UTF8. You may choose a different default \
if you prefer, but please note that elvis does not support UTF8." 14 76 3 \
"elvis" "Slackware's traditional ex/vi, no UTF8 support" \
"nvi" "Classic BSD ex/vi, supports UTF8" \
-"vim" "VI Improved - top rated ex/vi clone, supports UTF8" \
+"vim" "Vi IMproved - top rated ex/vi clone, supports UTF8" \
2> $TMP/exvitype
if [ ! $? = 0 ]; then
rm -f $TMP/exvitype
@@ -22,10 +22,29 @@ if [ -f $TMP/exvitype ]; then
else
exit 0
fi
+# Only make the symlinks if the targets actually exist.
if [ "$DEFAULT_VI" = "elvis" ]; then
- ( cd $T_PX/usr/bin ; rm -f ex vi ; ln -sf elvis ex ; ln -sf elvis vi )
+ ( cd $T_PX/usr/bin
+ if [ -e elvis ]; then
+ rm -f ex vi
+ ln -sf elvis ex
+ ln -sf elvis vi
+ fi
+ )
elif [ "$DEFAULT_VI" = "nvi" ]; then
- ( cd $T_PX/usr/bin ; rm -f ex vi ; ln -sf nex ex ; ln -sf nvi vi )
+ ( cd $T_PX/usr/bin
+ if [ -e nex -a -e nvi ]; then
+ rm -f ex vi
+ ln -sf nex ex
+ ln -sf nvi vi
+ fi
+ )
elif [ "$DEFAULT_VI" = "vim" ]; then
- ( cd $T_PX/usr/bin ; rm -f ex vi ; ln -sf vim ex ; ln -sf vim vi )
+ ( cd $T_PX/usr/bin
+ if [ -e vim ]; then
+ rm -f ex vi
+ ln -sf vim ex
+ ln -sf vim vi
+ fi
+ )
fi