u
This commit is contained in:
@@ -64,8 +64,8 @@ if [ ${operation} == "update" ] ; then
|
||||
fi
|
||||
|
||||
# https://stackoverflow.com/questions/30988586/creating-an-array-from-a-text-file-in-bash
|
||||
packages_no_comments < sed '/^[[:blank:]]*#/d;s/#.*//' ${x}
|
||||
mapfile -t packages < ${packages_no_comments}
|
||||
sed '/^[[:blank:]]*#/d;s/#.*//' ${trg_file} > ${trg_file}.tmp
|
||||
mapfile -t packages < ${trg_file}.tmp
|
||||
|
||||
installed=$(pacman -Qq)
|
||||
list=()
|
||||
@@ -76,9 +76,7 @@ if [ ${operation} == "update" ] ; then
|
||||
echo "Skipping (1) $x"
|
||||
elif [[ $installed != *$x* ]]
|
||||
then
|
||||
if [[ $(echo "$installed" | grep -E -o "^$x$") != $x ]]
|
||||
then
|
||||
#grep -o '^[^#]*' ${x} > x
|
||||
if [[ $(echo "$installed" | grep -E -o "^$x$") != $x ]] then
|
||||
echo "Adding $x to list"
|
||||
list+="$x "
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user