I'm trying to make a bash script that checks if a binary has the executable bit and if it doesn't, it automatically adds it.
When i execute the script i get the following error: script/repair.sh: 37: chmod: not found.
Here is the code:
PATH="/my/path/"
BIN="mybin"
if chmod +x $PATH$BIN != -1; then
echo "Added the executable bit to '$BIN'"
else
echo "Couldn't add the executable bit to '$BIN'"
fi