Downloads and installs mldonkey (http://www.mldonkey.org/) and the GUI and creates desktop icons.

Code:
#!/bin/bash

# knx_mldonkey.sh 0.1
# Install mldonkey filesharing application http://www.mldonkey.org/
# by probono
# GPL


if [ -f "mldonkey-2.04rc1-0.static.i686-Linux.tar.bz2" ];
then
   cp mldonkey-2.04rc1-0.static.i686-Linux.tar.bz2 ~/
   cd ~/
else
   cd ~/
   wget http://savannah.nongnu.org/download/...-Linux.tar.bz2
fi

tar jxf mldonkey-2.04rc1-0.static.i686-Linux.tar.bz2 -C ~/
mv ~/mldonkey-distrib-2.04rc1-0 ~/.mldonkey
rm -rf mldonkey-2.04rc1-0.static.i686-Linux.tar.bz2

mkdir -p ~/Desktop/

cat >> ~/Desktop/mldonkey.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Exec=cd ~/.mldonkey; ./mldonkey
Icon=network
MimeType=
Name=mldonkey
Path=
ServiceTypes=
SwallowExec=
SwallowTitle=
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
EOF

cat >> ~/Desktop/mldonkey_gui.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Exec=cd ~/.mldonkey; ./mldonkey_gui
Icon=network
MimeType=
Name=mldonkey
Path=
ServiceTypes=
SwallowExec=
SwallowTitle=
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
EOF

cat >> ~/Desktop/FAQ.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Icon=html
Type=Link
URL=~/.mldonkey/FAQ.html
EOF

cat >> ~/Desktop/incoming.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Icon=folder_html
Type=Link
URL=~/.mldonkey/incoming
EOF