Created
October 3, 2011 21:15
-
-
Save joshbirk/1260274 to your computer and use it in GitHub Desktop.
This is one way to swap out the password with the one in keychain, build, then swap back.
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
. build.properties | |
if [ ${usekeychainaccess} == 'enabled' ] | |
then | |
shellpassword=$(~/bin/keychain.sh ${password}) | |
sed "s/${password}/${shellpassword}/" build.properties > new.properties | |
cp new.properties build.back | |
cp new.properties build.properties | |
fi | |
ant build-all | |
if [ ${usekeychainaccess} == 'enabled' ] | |
then | |
sed "s/${shellpassword}/${password}/" build.properties > new.properties | |
cp new.properties build.back | |
cp new.properties build.properties | |
rm new.properties | |
rm build.back | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shell script referenced as "keychain.sh"
security 2>&1 >/dev/null find-generic-password -ga $1$1 if STDIN.gets =~ /^password: "(.*)"$ /'
|ruby -e 'print