commit - bd3332afc264bfc8e648e4f37c2d929ac638c699
commit + b2af058cab8fb848294a2d870079e6a705ecfe4b
blob - 9665e5e8a38221a5ef0a5131a9f02649703e17e2
blob + d703af83df7ad7418bc7a9141212770283cc19ec
--- tpm
+++ tpm
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+set -eu
+
umask 077
##
GPGB="gpg"
TPMDIR="/tmp"
NUKE="rm"
+PASSWORD_STORE_KEY=${PASSWORD_STORE_KEY:-""}
##
# Variables r/o
entry_exists ${_entry_name}
- mygpg --decrypt "${_entry_path}"
+ mygpg --decrypt "${_entry_path}" || abort "Cannot open entry"
}
insert() {
# Parse input
##
+set +u
[ "${1}" != "insert" -a ! -d "${STORE_DIR}" ] && abort "Password directory does not exist."
+set -u
if [ ! -z "$(which colortree)" ]; then
TREE=colortree