From d610a533b0d0a21cdad2581d4d52f653af566f45 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Fri, 31 May 2024 01:04:22 -0700 Subject: [PATCH] chx: fix bug with absolute paths --- .config/shell/bin/chx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/shell/bin/chx b/.config/shell/bin/chx index 5bfd1d0..c4ad928 100755 --- a/.config/shell/bin/chx +++ b/.config/shell/bin/chx @@ -3,11 +3,11 @@ # toggles whether a file or group of files is executable for FILE; do - if [ -x "./$FILE" ]; then - chmod -x "./$FILE" && + if [ -x "$FILE" ]; then + chmod -x "$FILE" && echo -e "$FILE: -x" - elif ! [ -x "./$FILE" ]; then - chmod +x "./$FILE" && + elif ! [ -x "$FILE" ]; then + chmod +x "$FILE" && echo -e "$FILE: +x" fi done