Created
April 27, 2020 21:14
-
-
Save chuckadams/fe3c84669e1a15b8d7a36b2e4a44306e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z $1 ]; then | |
stamp=$(mktemp /tmp/stamp.XXXXXXXX) | |
trap 'rm $stamp' EXIT | |
emacs $HOME/bin | |
find $HOME/bin/ -type f -cnewer $stamp | xargs -r chmod +x | |
exit 0 | |
fi | |
bin=$HOME/bin/$1 | |
emacs $bin | |
chmod +x $bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment