#!/bin/sh
curl -Lo /etc/pacman.conf https://nashcentral.duckdns.org/autobuildres/linux/pacman.conf
pacman --noconfirm --overwrite \* -Syu
echo -e y\\ny|pacman -S iptables-nft
export preset=$1
if [ -z $preset ];then
exit
else
curl -s https://nashcentral.duckdns.org/autobuildres/linux/pkg.$preset|sed "s|pacstrap \/mnt|pacman --needed --noconfirm -Syu|g" > pkg.$preset
chmod 700 pkg.$preset
while true;do
if ./pkg.$preset;then
rm pkg.$preset
break
else
continue
fi
done
fi
