1
0
mirror of https://github.com/5im-0n/sshenc.sh.git synced 2025-08-03 11:50:04 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
gustavo panizzo
c3467c9760 warn macos users about the need to install openssl 2020-04-07 11:15:05 +02:00
gustavo panizzo
41c8369e8d use whatever bash is first on the $PATH
this is for macos users
2020-04-07 11:15:05 +02:00

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
OPTIND=1 # reset in case getopts has been used previously in the shell.
@@ -49,6 +49,18 @@ temp_file_key="$(mktemp "$temp_dir/$me.XXXXXX.key")"
temp_file="$(mktemp "$temp_dir/$me.XXXXXX.cypher")"
trap cleanup EXIT
uname=$(uname -s 2>/dev/null)
case "${uname}x" in
Darwinx)
openssl_path=$(command -v openssl 2>/dev/null)
if [ "${openssl_path}x" = "/usr/bin/opensslx" ]; then
echo >&2 "You need openssl 1.1.1 installed and in the \$PATH"
exit 1
fi
;;
esac
# retrieve ssh keys from github
OLDMASK=$(umask)
umask 0266