create ignored packages file if not existent in ignore command
This commit is contained in:
6
pman.sh
6
pman.sh
@@ -56,6 +56,12 @@ elif [ "$command_args" = "ignored" ]; then
|
||||
command="echo"
|
||||
command_args="$(cat $ignoredpkgs_file | sed 's/IgnorePkg = //' | sort)"
|
||||
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
|
||||
if [ "$(grep -e "$pkg$" $ignoredpkgs_file)" != "" ]; then
|
||||
echo "$pkg is already ignored, skipping..."
|
||||
|
||||
Reference in New Issue
Block a user