so i need to use chmod +x alot, and i thought it could be easier to make a service in Automator to add it to the right click menu, so it will run chmod +x on the selected file as choose it from the right click menu ive no idea how to do that so any help would be appreciated
something similar to this:Add a custom terminal command to context menu in mac
whats the command i need to right in order to tell it to run chmod +x on the file when i right click it?
1 Answer
It is essentially the same steps. I think you just need the right script and parameters.
- Launch automator
- Choose Service
- Make sure Service is set to receive "selected files and folders" in "Finder"
- Add an action - type Run Shell Script
- Change the actions options to Shell: /bin/bash, Pass input: As Arugments
- Now you want to add your shell commands. Since you already know you
need chmod +x as your command, we just need the right paramters to
pass along the file received. This will be
chmod +x "$@" - Save the service (by default will go in ~/Library/Services)
You should now be able to select an individual file and use the Services menu to add the executable flag.
0