#! /bin/sh
#
# ad-hoc script to get poldek on non-pld machine
#
set -x
cd /tmp && rm -fr tmp$$ && mkdir tmp$$ && cd tmp$$
wget -nd http://ftp.pld.org.pl/PLD-1.0/`uname -m`/PLD/inst/pkg/poldek-pkg.tar.gz
tar xzf poldek-pkg.tar.gz
cp dest/installer/bin/poldek /usr/bin/poldek
cd /tmp && rm -fr tmp$$
echo "source = ftp://ftp.pld.org.pl/PLD-1.0/`uname -m`/PLD/RPMS/" >/etc/poldek.conf
echo "hold = kernel" >> /etc/poldek.conf
poldek --update
echo "Type 'poldek --help' to get more info."
echo "Tip: if you want to upgrade packages for non-pld machine, --greedy option might be necessary"
