blob: 70b093b923ccffa6f839d90188dde45be01ffd57 [file] [log] [blame]
From 6052ce29af20d237f6fe6f044e9f4110e053c763 Mon Sep 17 00:00:00 2001
From: vaeth <martin@mvath.de>
Date: Sat, 21 Mar 2015 20:14:13 +0100
Subject: [PATCH] Re-introduce POSIX compatibility
By making the openssh 6.8 format match slightly more verbose, one can make it POSIX compatible again and remove the bashism "shopt". This way, the script works (again) if /bin/sh is a symlink to dash.
---
keychain.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/keychain.sh b/keychain.sh
index 6dae912..1ab79ba 100755
--- a/keychain.sh
+++ b/keychain.sh
@@ -56,8 +56,6 @@ unset ssh_confirm
unset GREP_OPTIONS
realpath_bin="`command -v realpath`"
-shopt -s extglob
-
BLUE=""
CYAN=""
CYANN=""
@@ -683,7 +681,7 @@ extract_fingerprints() {
# 1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_dsa (DSA)
echo "$ef_line" | cut -f2 -d' '
;;
- *\ @(SHA256|MD5):[0-9a-zA-Z\+\/=]*)
+ *\ SHA256:[0-9a-zA-Z\+\/=]*|*\ MD5:[0-9a-zA-Z\+\/=]*)
# The new OpenSSH 6.8+ format,
# 1024 SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE /home/barney/.ssh/id_dsa (DSA)
echo "$ef_line" | cut -f2 -d' '
--
2.3.5