This commit is contained in:
tuxwarrior
2024-05-01 14:28:24 -05:00
parent 82a17ba59a
commit 51f9bbf694

View File

@@ -64,7 +64,7 @@ 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} mapfile -t packages < grep -o '^[^#]*' ${trg_file}
installed=$(pacman -Qq) installed=$(pacman -Qq)
list=() list=()
@@ -77,7 +77,7 @@ if [ ${operation} == "update" ] ; then
then then
if [[ $(echo "$installed" | grep -E -o "^$x$") != $x ]] if [[ $(echo "$installed" | grep -E -o "^$x$") != $x ]]
then then
grep -o '^[^#]*' ${x} > x #grep -o '^[^#]*' ${x} > x
echo "Adding $x to list" echo "Adding $x to list"
list+="$x " list+="$x "
else else