fix all sorts of stuff with dgl-create-chroot

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@344 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2006-07-09 07:04:09 +00:00
parent f3239d7a2f
commit ee906001f2
2 changed files with 21 additions and 11 deletions

View File

@ -1,4 +1,4 @@
1.4.7 (2004/??/??)
1.4.7 (2006/??/??)
* Make the watching code more efficient (particularly on FreeBSD) and
clean it up a bit.
* Fix bug where old cruft was left under the watch list after 'm'
@ -7,6 +7,11 @@
* Use kqueue() if available (FreeBSD) to improve watching.
* Update svn link.
* Use $(DESTDIR) intelligently in installation procedure.
* Fix dgl-create-chroot to do a more intelligent $termdata check,
and to not choke on finding linux-gate.so.1 in ldd output (the file
does not actually exist. Also make the copy a dereferncing one, since
Debian now has a weird symlinking deal that makes it hard to accumulate
all the directories together.
1.4.6 (2004/07/03)
* Fix some signed/unsigned warnings.

View File

@ -23,21 +23,26 @@ playground_fixed="/usr/lib/games/nethack"
# variable data to create (leave blank to skip) (may be equal to previous)
playground_var="/var/games/nethack"
# termcap/terminfo (copied recursively) (leave blank to skip)
if [ -d "/etc/terminfo" ]; then
termdata="/etc/terminfo"
elif [ -d "/usr/share/lib/terminfo" ]; then
termdata="/usr/share/lib/terminfo"
else
termdata="/usr/share/terminfo"
fi
[ -f dgl-create-chroot.conf ] && . ./dgl-create-chroot.conf
if [ -z "$termdata" ]; then
for dir in /etc/terminfo /usr/share/lib/terminfo /usr/share/terminfo; do
if [ -e "$dir/x/xterm" ]; then
termdata=$dir
break
fi
done
if [ -z "$termdata" ]; then
echo "Error: couldn't find terminfo definitions. Please specify in 'termdata' variable." >&2
exit 1
fi
fi
findlibs()
{
for i in "$@"; do
# () to ignore errors
( ldd "$i" 2>/dev/null | awk '{ if ($2=="=>") print $3; }' )
( ldd "$i" 2>/dev/null | awk '{ if ($2=="=>" && $1!="linux-gate.so.1") print $3; }' )
done
}
findinpath()
@ -128,7 +133,7 @@ fi
if [ -n "$termdata" ]; then
mkdir -p $chroot_path`dirname $termdata`
if [ -d $termdata/. ]; then
cp -R $termdata/. $chroot_path$termdata
cp -LR $termdata/. $chroot_path$termdata
else
cp $termdata $chroot_path`dirname $termdata`
fi