Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37715236
en ru br
ALT Linux repos
S:7.0.3-alt1
5.0: 4.11-alt4
4.1: 4.11-alt3
4.0: 4.8-alt4
3.0: 4.8-alt2

Group :: Publishing
RPM: texinfo

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh -efu
# update-info-dir
# create a dir file from all installed info files
# Copyright 2009 Norbert Preining
# GPLv2

unset RPM_INSTALL_NAME
errors=0

if [ -n "${1-}" ]; then
INFODIR="$1"; shift
else
INFODIR=/usr/share/info
fi

cd "$INFODIR"

update_index()
{
if dir="$(readlink -e dir)"; then
mv -f -- "$dir" "$dir.old" ||:
fi

find -maxdepth 1 -type f |while read file; do
t=${file##*/}
t=${t%.gz}
t=${t%.bz2}
t=${t%.lzma}
t=${t%.xz}
case "$t" in
dir|dir.old|*.png|*-[0-9]|*-[1-9][0-9]|*-[1-9][0-9][0-9])
# these files are ignored
continue
;;
*)
install-info --dir-file=dir --info-file="$file" ||
errors=$(($errors+1))
;;
esac
done
}

find -type d |while read d; do
pushd "$d" >/dev/null
update_index
popd >/dev/null
done

if [ $errors -gt 0 ]; then
echo >&2 "Updating the index of info documentation produced $errors errors."
fi

exit 0

# vim:set expandtab tabstop=2: #
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin