dotfiles/scripts/gitCheckoutModes
Geoffrey Frogeye ee178b7d57
nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
2023-11-26 23:58:22 +01:00

9 lines
363 B
Plaintext
Executable file

#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash git gnugrep coreutils findutils
# From https://stackoverflow.com/a/2083563
git diff --summary | grep --color 'mode change 100755 => 100644' | cut -d' ' -f7- | xargs -d'\n' chmod +x
git diff --summary | grep --color 'mode change 100644 => 100755' | cut -d' ' -f7- | xargs -d'\n' chmod -x