man-pages/update.sh
Petr Gajdos ab97592e86 - update to version 3.36
* New and rewritten pages
      sendmmsg.2
        New page for sendmmsg(2)
            Some pieces inspired by an initial attempt by Stephan Mueller.
  * Newly documented interfaces in existing pages
      fallocate.2
        Document FALLOC_FL_PUNCH_HOLE
            FALLOC_FL_PUNCH_HOLE was added in Linux 2.6.38,
            for punching holes in the allocated space in a file.
  * Changes to individual pages
      dup.2
        SYNOPSIS: Add "#include <fntl.h>" for O_* constants
      fallocate.2
        Substantial restructuring of DESCRIPTION
            The addition of a second class of operation ("hole punching")
            to the man page made it clear that some significant restructuring
            is required. So I substantially reworked the page, including the
            preexisting material on the default "file allocation" operation.
        Add further details for FALLOC_FL_PUNCH_HOLE
        ERRORS: Add EPERM error case for FALLOC_FL_PUNCH_HOLE
      fork.2
        NOTES: Describe clone() call equivalent to fork()
      fsync.2
        Various improvements
            - explain the situation with disk caches better
            - remove the duplicate fdatasync() explanation in the NOTES
              section
            - remove an incorrect note about fsync() generally requiring two
              writes

OBS-URL: https://build.opensuse.org/package/show/Documentation/man-pages?expand=0&rev=43
2012-03-05 07:39:23 +00:00

57 lines
1.4 KiB
Bash

#
# USAGE: bash update.sh VERSION
#
function usage()
{
echo "USAGE: bash update.sh VERSION"
}
function acquire_changes()
{
CHANGES_FILE="$1"
LINENUM=`grep -n "New and rewritten pages" $CHANGES_FILE | sed "s/:.*//"`
LINESUM=`wc -l $CHANGES_FILE | sed "s:[ ].*::"`
LINETAIL=$((LINESUM-LINENUM+1))
tail -n $LINETAIL $CHANGES_FILE | egrep -v "^$" | grep -v "\----" | grep -v "^ [A-Z]" | sed "s:\(^[_a-zA-Z].*\.[0-9]\): \1:" | sed "s:^\([A-Z].*\): * \1:" > changes
}
VERSION="$1"
if [ -z $VERSION ]; then
usage
exit 1
fi
PACKNAME="man-pages"
UTARBALL="$PACKNAME-$VERSION.tar.gz"
OTARBALL="$PACKNAME-$VERSION.tar.bz2"
URL="http://www.kernel.org/pub/linux/docs/man-pages/$UTARBALL"
# get tarball
wget $URL
if [ $? -ne 0 ]; then
echo $URL not found.
exit 1
fi
tar xvzf $UTARBALL
rm -f $PACKNAME*.tar.{bz2,gz}
tar cvjf $OTARBALL $PACKNAME-$VERSION
# write down changes
acquire_changes "$PACKNAME-$VERSION/Changes"
{
LANG=en_US date_output=`date`
echo "-------------------------------------------------------------------"
echo "$date_output - pgajdos@suse.cz"
echo ""
echo "- update to version $VERSION"
cat changes
echo ""
} > man-pages.changes.new
cat man-pages.changes >> man-pages.changes.new
rm man-pages.changes
mv man-pages.changes.new man-pages.changes
rm changes
# modify spec
sed -i "s/\(Version:[ \t]*\)[0-9].*/\1$VERSION/" $PACKNAME.spec
rm -r man-pages-$VERSION