This commit is contained in:
tuxwarrior
2024-05-01 15:47:57 -05:00
parent 1eb4064b31
commit 9629b4ed53

View File

@@ -64,15 +64,13 @@ 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
mapfile -t packages < ${trg_file} packages_no_comments < sed '/^[[:blank:]]*#/d;s/#.*//' ${x}
mapfile -t packages < ${packages_no_comments}
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"