This file contains 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
# XCode 4 auto-versioning script for Git | |
# Inspired by the work of Axel Andersson, Marcus S. Zarra and Matt Long | |
# http://valthonis.net/u/19 | |
""" | |
NOTE: Due to its use of build environment variables, this | |
script will only work from inside XCode's build process! | |
""" | |
import os |
This file contains 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/bash | |
# Create the script that emits values for a single file using stat. | |
cat >/tmp/fileperms.sh <<FILEPERMS | |
#!/bin/bash | |
echo chmod `stat -f '%Lp' \$1` \"\$1\" | |
echo chown `stat -f '%u' \$1`:`stat -f '%g' \$1` \"\$1\" | |
FILEPERMS | |
# Make sure the script is executable |