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="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..."
|
||||||
|
|||||||
Reference in New Issue
Block a user