update buildroot - work in progress development
[cmdllinux.git] / buildroot / _pkg_tmp / update.sh
blob4116294ee7e4444331080ba4fe38769b3c654459
1 remove(){
3 [ -z "$1" ] && return 1
5 if PKGNAME=`pacman -Q $1 2> /dev/null`; then
6 DIR=`echo "$PKGNAME" | tr ' ' -`
7 test -d /var/lib/pacman/local/$DIR || exit 1
8 cat /var/lib/pacman/local/$DIR/files | \
9 while read file; do
10 case "$file" in
11 %FILES%|"") continue;;
12 */)
13 #rm
14 rmdir "/$file" > /dev/null 2>&1
17 rm "/$file" > /dev/null 2>&1
20 esac
21 done
26 for i in /var/lib/instpkg/packages/*; do
27 [ -d $i ] || continue
28 cd $i
29 echo $i
30 find -mindepth 1 | cpio -pdu --make-directories /
32 rm -f $i/.files
33 find -mindepth 1 | sort | sed 's%^\./%%' | \
34 while read file; do
35 [ -d "/$file" ] && echo "/$file/" >> $i/.files || echo "/$file" >> $i/.files
36 done
37 done