Skip to content

Commit

Permalink
141 interim
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBrown committed Jun 16, 2016
1 parent 4b8a49b commit 82433ae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ Only necessary if for some reason you want to run this from the shell or another
* My own minisign public key for releases on Github will be created in `${HOME}/Documents/minisign`

## To-do
* Switch private keys directory to `${HOME}/.minisign` (depending on minisign update)
- [ ] Notification if update is available
- [ ] Switch private keys directory to `${HOME}/.minisign` (pending `minisign` update)

## Screengrabs
### Signing
Expand Down
16 changes: 13 additions & 3 deletions minisign-sign.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
#!/bin/bash

# minisign-sign v1.4 (shell script version)
# minisign-sign v1.4.1 (shell script version)

LANG=en_US.UTF-8
export PATH=/usr/local/bin:$PATH
ACCOUNT=$(who am i | /usr/bin/awk '{print $1}')

# determine correct Mac OS name
MACOS2NO=$(/usr/bin/sw_vers -productVersion | /usr/bin/awk -F. '{print $2}')
if [[ "$MACOS2NO" -le 7 ]] ; then
OSNAME="Mac OS X"
elif [[ "$MACOS2NO" -ge 8 ]] && [[ "$MACOS2NO" -le 11 ]] ; then
OSNAME="OS X"
elif [[ "$MACOS2NO" -ge 12 ]] ; then
OSNAME="macOS"
fi

# set notification function
notify () {
if [[ "$NOTESTATUS" == "osa" ]] ; then
Expand Down Expand Up @@ -146,7 +156,7 @@ EOT)
tell application "System Events"
activate
set theLogoPath to ((path to library folder from user domain) as text) & "Caches:local.lcars.minisign:lcars.png"
set thePassword to text returned of (display dialog "Enter the password for the new secret key. It will be stored in your macOS keychain." ¬
set thePassword to text returned of (display dialog "Enter the password for the new secret key. It will be stored in your " & "$OSNAME" & " keychain." ¬
default answer "" ¬
with hidden answer ¬
buttons {"Cancel", "Enter"} ¬
Expand Down Expand Up @@ -223,7 +233,7 @@ EOT)
tell application "System Events"
activate
set theLogoPath to ((path to library folder from user domain) as text) & "Caches:local.lcars.minisign:lcars.png"
set thePassword to text returned of (display dialog "There is no password stored in your macOS keychain for this secret key. Enter the password you chose when you created this key." ¬
set thePassword to text returned of (display dialog "There is no password stored in your " & "$OSNAME" & " keychain for this secret key. Enter the password you chose when you created this key." ¬
default answer "" ¬
with hidden answer ¬
buttons {"Cancel", "Enter"} ¬
Expand Down
2 changes: 1 addition & 1 deletion minisign-verify.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# minisign-verify v1.4 (shell script version)
# minisign-verify v1.4.1 (shell script version)

LANG=en_US.UTF-8
export PATH=/usr/local/bin:$PATH
Expand Down

0 comments on commit 82433ae

Please sign in to comment.