From 43a001e02b897c6b2e68738147e25dfd3c825f65 Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sat, 30 May 2026 09:42:39 +0200 Subject: [PATCH] create ignored packages file if not existent in `ignore` command --- pman.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pman.sh b/pman.sh index f948177..812e8ab 100755 --- a/pman.sh +++ b/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..."