diff options
author | brooks <brooks@FreeBSD.org> | 2013-01-17 20:21:30 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2013-01-17 20:21:30 +0000 |
commit | 6fd273a1c075120d4b9d6069e73e110d3d4fc218 (patch) | |
tree | 3f2cea921ff5974d52267cfd655b3e610309e4fc /etc/Makefile | |
parent | 5d52912ea97781e09bc241ed5bb6bb4bbd06d040 (diff) | |
download | FreeBSD-src-6fd273a1c075120d4b9d6069e73e110d3d4fc218.zip FreeBSD-src-6fd273a1c075120d4b9d6069e73e110d3d4fc218.tar.gz |
In preparation for logging metadata about each filesystem object
refactor the link section of distrib-dirs to alwasy install to a full
path (the link contents remain relative as they should).
Eliminate the use of the "rm -r[f] <foo>; ln -s <bar> <foo>" pattern in
favor of "ln -sf <bar> <foo>". None of these links could be directories
on a system installed in the last decade.
Sponsored by: DARPA, AFRL
Reviewed by: mtree
Diffstat (limited to 'etc/Makefile')
-rw-r--r-- | etc/Makefile | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/etc/Makefile b/etc/Makefile index ea29cd0..5053762 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -324,32 +324,26 @@ distrib-dirs: -f $$m -p $$d; \ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ done; true - cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys - cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* . - cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* . + ln -sf usr/src/sys ${DESTDIR}/sys cd ${DESTDIR}/usr/share/man; \ - set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ln -s "$$2" "$$1"; \ - shift; shift; \ + for mandir in man*; do \ + ln -sf ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ + ln -sf ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \ done cd ${DESTDIR}/usr/share/openssl/man; \ + for mandir in man*; do \ + ln -sf ../$$mandir \ + ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ + done set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ln -s "$$2" "$$1"; \ + while [ $$# -gt 0 ] ; do \ + ln -sf "$$2" "${DESTDIR}/usr/share/man/$$1"; \ + ln -sf "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \ shift; shift; \ done - cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* . - cd ${DESTDIR}/usr/share/nls; \ set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ - while [ $$# -gt 0 ] ; \ - do \ - rm -rf "$$1"; \ - ln -s "$$2" "$$1"; \ + while [ $$# -gt 0 ] ; do \ + ln -sf "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done |