Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (27 sloc) 0.884 kB
#!/usr/bin/env zsh
ZF_export_secrets() {
for user ($HOME/.secrets/*); do
for secret ($user/$1/env/*); do
export $secret:t="$(<$secret)"
done
done
}
ZF_dismount_and_clear_secrets() {
/Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt -d ~/.secrets
echo "Remember to close all shells and tmux sessions!"
}
ZF_mount_and_export_secrets() {
if ([ ! -d $HOME/.secrets ]) then
/Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt ~/Dropbox/Backups/secrets ~/.secrets
fi
ZF_export_secrets $1
}
alias secrets_for_development="ZF_mount_and_export_secrets development"
alias secrets_for_production="ZF_moount_and_export_secrets production"
alias secrets_for_noone="ZF_dismount_and_clear_secrets"
if ([ -d $HOME/.secrets ]) then
secrets_for_development
else
echo "Don't forget to run 'secrets_for_development' to enable your env keys"
fi
# vim: ft=zsh
Jump to Line
Something went wrong with that request. Please try again.