This commit is contained in:
tuxwarrior
2024-05-01 15:46:19 -05:00
parent 8fcc2b5ef1
commit 1eb4064b31

View File

@@ -64,14 +64,15 @@ if [ ${operation} == "update" ] ; then
fi fi
# https://stackoverflow.com/questions/30988586/creating-an-array-from-a-text-file-in-bash # https://stackoverflow.com/questions/30988586/creating-an-array-from-a-text-file-in-bash
sed '/^[[:blank:]]*#/d;s/#.*//' ${trg_file}
mapfile -t packages < ${trg_file} mapfile -t packages < ${trg_file}
installed=$(pacman -Qq) installed=$(pacman -Qq)
list=() list=()
for x in ${packages[@]} for x in ${packages[@]}
do do
echo "..."
echo sed '/^[[:blank:]]*#/d;s/#.*//' ${x}
if [[ $installed == *$x* ]] if [[ $installed == *$x* ]]
then then
echo "Skipping (1) $x" echo "Skipping (1) $x"