added man-patch.xml file
[linux_from_scratch.git] / checklfs / bin / pkgdel
blob0e58e5472b0838d5258132f68f74bcc629bf7047
1 #!/bin/sh
2 # By Gerard Beekmans <gerard@linuxfromscratch.org>
4 if [ -z $1 ]
5 then
6 echo "Usage: $0 logfile"
7 exit 1
8 fi
10 echo && echo
12 cd /usr/share/checklfs/install-logs
14 echo "Starting deinstallation of $1, please stand by..."
16 for item in $(cat $1 | sort -r)
18 if [ -f $item ] || [ -h $item ]
19 then
20 rm $item
22 done
24 for item in $(cat $1 | sort -r)
26 if [ -d $item ]
27 then
28 rmdir $item
30 done
32 rm $1
34 echo "Deinstallation of $1 completed."