diff options
author | Jason Stubbs <jstubbs@gentoo.org> | 2005-08-28 08:37:44 +0000 |
---|---|---|
committer | Jason Stubbs <jstubbs@gentoo.org> | 2005-08-28 08:37:44 +0000 |
commit | d9fc4acc572c6647a4f27b838d35d27d805d190e (patch) | |
tree | 262a8de35d8c7567312757da5f1f66efdc8cece5 /bin/prepalldocs | |
download | portage-d9fc4acc572c6647a4f27b838d35d27d805d190e.tar.gz portage-d9fc4acc572c6647a4f27b838d35d27d805d190e.tar.bz2 portage-d9fc4acc572c6647a4f27b838d35d27d805d190e.zip |
Migration (without history) of the current stable line to subversion.
svn path=/main/branches/2.0/; revision=1941
Diffstat (limited to 'bin/prepalldocs')
-rwxr-xr-x | bin/prepalldocs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bin/prepalldocs b/bin/prepalldocs new file mode 100755 index 000000000..26ac80ca4 --- /dev/null +++ b/bin/prepalldocs @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-src/portage/bin/prepalldocs,v 1.6 2004/10/04 13:56:50 vapier Exp $ + +z="`find "${D}"usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`" + +for y in ${z} ; do + if [ -L "${y}" ] ; then + # Symlink ... + mylink="${y}" + linkto="`readlink "${y}"`" + + if [ "${linkto##*.}" != "gz" ] ; then + linkto="${linkto}.gz" + fi + if [ "${mylink##*.}" != "gz" ] ; then + mylink="${mylink}.gz" + fi + + echo "fixing doc symlink: ${mylink##*/}" + ln -snf "${linkto}" "${mylink}" + if [ "${y}" != "${mylink}" ] ; then + echo "removing old symlink: ${y##*/}" + rm -f "${y}" + fi + else + if [ "${y##*.}" != "gz" ] ; then + echo "gzipping doc: ${y##*/}" + gzip -f -9 "${y}" + fi + fi +done |