create ignored packages file if not existent in ignore command

This commit is contained in:
2026-05-30 09:42:39 +02:00
parent 34f396534d
commit 43a001e02b

View File

@@ -56,6 +56,12 @@ elif [ "$command_args" = "ignored" ]; then
command="echo" command="echo"
command_args="$(cat $ignoredpkgs_file | sed 's/IgnorePkg = //' | sort)" command_args="$(cat $ignoredpkgs_file | sed 's/IgnorePkg = //' | sort)"
elif [ "$command_args" = "ignore" ]; then elif [ "$command_args" = "ignore" ]; then
if [ ! -f "$ignoredpkgs_file" ]; then
su_needed=true
command="touch"
command_args="$ignoredpkgs_file"
execute_command
fi
for pkg in "${@}"; do for pkg in "${@}"; do
if [ "$(grep -e "$pkg$" $ignoredpkgs_file)" != "" ]; then if [ "$(grep -e "$pkg$" $ignoredpkgs_file)" != "" ]; then
echo "$pkg is already ignored, skipping..." echo "$pkg is already ignored, skipping..."