summaryrefslogtreecommitdiffstats
path: root/etc/Makefile
diff options
context:
space:
mode:
authorphantom <phantom@FreeBSD.org>2002-01-08 13:42:52 +0000
committerphantom <phantom@FreeBSD.org>2002-01-08 13:42:52 +0000
commit024413e7ac1e24ef5198f9eed50b8daa09998596 (patch)
treeeb8af66e4a579fff5532d7393f7c76e1a81ff773 /etc/Makefile
parent94cf97175fa2458d561886abcd0b802e3f0a5772 (diff)
downloadFreeBSD-src-024413e7ac1e24ef5198f9eed50b8daa09998596.zip
FreeBSD-src-024413e7ac1e24ef5198f9eed50b8daa09998596.tar.gz
Correctly handle cases of deprecated locales which are supposed
to have backward compatibility symbolic links. This code should check existence of deprecated locales and fix them using following scheme: . if new locale directory exisists and is a symlink -- remove it . if old locale directory exists and not a symlink -- rename it to its new name This should allow to mtree(1) and existing locale aliases make(1) rules to setup locale dirs correctly (avoid self-referenced symlinks) BTW, this commit brings in backward compatibility support for ru_SU locales (aliased to appropriate ru_RU ones).
Diffstat (limited to 'etc/Makefile')
-rw-r--r--etc/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 1f3444b..02b7439 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -166,6 +166,19 @@ distribution:
.endif
distrib-dirs:
+ -set - `grep "^[a-zA-Z]" ${.CURDIR}/locale.deprecated`; \
+ while [ $$# -gt 0 ] ; \
+ do \
+ for dir in /usr/share/locale \
+ /usr/share/nls \
+ /usr/local/share/nls; \
+ do \
+ test -d ${DESTDIR}/$${dir} && cd ${DESTDIR}/$${dir}; \
+ test -L "$$2" && rm -rf "$$2"; \
+ test \! -L "$$1" && test -d "$$1" && mv "$$1" "$$2"; \
+ done; \
+ shift; shift; \
+ done
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
OpenPOWER on IntegriCloud