diff options
Diffstat (limited to 'source/a/pkgtools/scripts')
-rw-r--r-- | source/a/pkgtools/scripts/removepkg | 2 | ||||
-rw-r--r-- | source/a/pkgtools/scripts/setup.vi-ex | 27 |
2 files changed, 24 insertions, 5 deletions
diff --git a/source/a/pkgtools/scripts/removepkg b/source/a/pkgtools/scripts/removepkg index b033eebf..d94031dc 100644 --- a/source/a/pkgtools/scripts/removepkg +++ b/source/a/pkgtools/scripts/removepkg @@ -276,7 +276,7 @@ delete_dirs() { if [ ! "$WARN" = "true" ]; then if [ $(ls -a "$ROOT/$DIR" | wc -l) -eq 2 ]; then ! [ $TERSE ] && echo " --> Deleting empty directory $ROOT/$DIR" - rmdir "$ROOT/$DIR" + rmdir "$ROOT/$DIR" 2> /dev/null # Using 2> /dev/null to prevent noise from upgradepkg when a directory changes to a symlink. else ! [ $TERSE ] && echo "WARNING: Unique directory $ROOT/$DIR contains new files" fi diff --git a/source/a/pkgtools/scripts/setup.vi-ex b/source/a/pkgtools/scripts/setup.vi-ex index f58c15e0..f79ad91e 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 |