chx: fix bug with absolute paths
This commit is contained in:
parent
9eb49d029e
commit
d610a533b0
1 changed files with 4 additions and 4 deletions
|
@ -3,11 +3,11 @@
|
||||||
# toggles whether a file or group of files is executable
|
# toggles whether a file or group of files is executable
|
||||||
|
|
||||||
for FILE; do
|
for FILE; do
|
||||||
if [ -x "./$FILE" ]; then
|
if [ -x "$FILE" ]; then
|
||||||
chmod -x "./$FILE" &&
|
chmod -x "$FILE" &&
|
||||||
echo -e "$FILE: -x"
|
echo -e "$FILE: -x"
|
||||||
elif ! [ -x "./$FILE" ]; then
|
elif ! [ -x "$FILE" ]; then
|
||||||
chmod +x "./$FILE" &&
|
chmod +x "$FILE" &&
|
||||||
echo -e "$FILE: +x"
|
echo -e "$FILE: +x"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue