pash: more comments

This commit is contained in:
Dylan Araps 2019-11-29 19:59:57 +00:00
parent 6780a6a58a
commit acee5af947
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 4 additions and 0 deletions

4
pash
View File

@ -170,8 +170,12 @@ main() {
glob "$2" '*/*' && { mkdir -p "${2%/*}" || glob "$2" '*/*' && { mkdir -p "${2%/*}" ||
die "Couldn't create category '${2%/*}'."; } die "Couldn't create category '${2%/*}'."; }
# Set 'GPG_TTY' to the current 'TTY' if it
# is unset. Fixes a somewhat rare `gpg` issue.
export GPG_TTY=${GPG_TTY:-$(tty)} export GPG_TTY=${GPG_TTY:-$(tty)}
# Restrict permissions of any new files to
# only the current user.
umask 077 umask 077
# Ensure that we leave the terminal in a usable # Ensure that we leave the terminal in a usable