Last active
August 29, 2015 14:08
-
-
Save Pyppe/53f71017b0c11043b6ea 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
plz-sudo() { | |
local pass=`gimme-passwd` | |
echo $pass | sudo -S "$@" | |
} | |
gimme-passwd() { | |
local GPG_PASS_FILE="/home/pyppe/password.txt.gpg" | |
read -sp "Enter passphrase: " gpgpass | |
echo "${gpgpass}" | gpg --yes --no-tty --batch --passphrase-fd 0 -o- $GPG_PASS_FILE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment