# safecopy 0.2
# ============
cd
test -f installed/safecopy-0.2.tar.gz &&
mv installed/safecopy-0.2.tar.gz .
test ! -f safecopy-0.2.tar.gz &&
wget http://downloads.sf.net/safecopy/safecopy-0.2.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "safecopy-*" -exec rm -r {} \;
tar xzvf ~/safecopy-0.2.tar.gz
cd safecopy-0.2
test $UID = 0 && chown -R root:root .
./configure
make
su -c "make install"
cd
mkdir -p -m 0700 installed
rm -f installed/safecopy-*.tar.*
mv safecopy-0.2.tar.gz installed/
# If you ever want to uninstall safecopy, this should do it:
cd
su
test -d src/safecopy-* && ( cd src/safecopy-* ; make uninstall )
rm -f /usr/local/bin/safecopy
exit
find ~/src -maxdepth 1 -type d -name "safecopy-*" -exec rm -r {} \;
rm -f ~/installed/safecopy-*.tar.*