Created
October 30, 2014 04:36
-
-
Save nicferrier/49f34d6936814a457331 to your computer and use it in GitHub Desktop.
gpging the custom file
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
;; read the gpg agent file and set the env vars | |
(let ((gpg-agent-file (expand-file-name "~/.gpg-agent-info"))) | |
(when (file-exists-p gpg-agent-file) | |
(message "import gpg agent file") | |
(mapc | |
(lambda (line) | |
(unless (equal line "") | |
(apply 'setenv (split-string line "=")))) | |
(split-string | |
(with-temp-buffer | |
(insert-file-contents gpg-agent-file) | |
(buffer-string)) "\n")))) | |
;; Continue with init | |
(load-file | |
(setq custom-file | |
(concat | |
(file-name-directory | |
(or | |
(buffer-file-name) | |
load-file-name)) | |
"nic-custom.el.gpg"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment