#!/bin/sh

echo
echo "This program needs to be started from inside mldonkey directory."
echo "It won't send any information, it only creates one file that you"
echo "are free to send or not with your bug report."
echo
echo "Informations on your downloads, shared files and IP address will"
echo "be included in the created file."
echo
echo "If you have changed your incoming/, temp/ and torrents/ directories," 
echo "Create links incoming, temp and torrents to them before starting"
echo "this program."
echo
echo "You should send this information to bug-config@mldonkey.net with the"
echo "corresponding bug number of Savannah or the forum thread name. This"
echo "information will be kept private to the main developers."
echo
echo -n "Building file 'buginfo.tar.gz'..."

rm -f buginfo.tar.gz
mkdir -p buginfo
cp -f *.ini buginfo/
uname -a &> buginfo/uname
df &> buginfo/df
(ls -lR; df .) &> buginfo/mldonkey.directory
(cd incoming; ls -lR; df .) &> buginfo/incoming.directory
(cd temp; ls -lR; df .) &> buginfo/temp.directory
(cd torrents; ls -lR; df .) &> buginfo/torrents.directory
id &> buginfo/id
ifconfig &> buginfo/computer

tar cf buginfo.tar buginfo
rm -rf buginfo
gzip buginfo.tar

echo "done"
