#!/bin/sh
#1300927
[ ! "$2" ] && echo "Use: $0 dir list" && exit
dir=$1 ;shift ; mkdir -p $dir/var/lib/pacman/local 
mkdir -p $dir/dev && ln -sf /dev/null $dir/dev/
#exit 
#ls -1 >1 #rm -r `cat 1`
pacman --config ./pacman.conf -r $dir -Sy  `cat $@ |egrep -v '^#'` #pra-base
rm $dir/dev/null
exit 
#pacman --config /mnt/sda2/2/pacman-list/pacman.conf -r $1 -Sy --force \
#    alsa-utils-light amount busybox-pra dpacman-pra dropbear-sshclient mc-conf meric packer pfs-utils repacman-xz tzdata-rus uksmtools zz-filesystem-base 
#mkarchroot  -C ./pacman.conf $1  
