From 7bda825c1ae7b872ef56cbe068f6aeafeefafaee Mon Sep 17 00:00:00 2001 From: fanyx Date: Sun, 16 Oct 2022 12:41:52 +0200 Subject: [PATCH] correct exit status handling --- .local/bin/xr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.local/bin/xr b/.local/bin/xr index 5b30c0b..7b3a741 100755 --- a/.local/bin/xr +++ b/.local/bin/xr @@ -22,4 +22,10 @@ do_remove() { SUDO=$(which_sudo) do_remove -R "$@" -exit $? +status=$? +if [ $status -eq 16 ]; then + do_install -u xbps && + do_install -S "$@" +else + exit $status +fi