1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-29 00:54:50 +03:00

tests/sshd_fixture.sh: convert back to POSIX

There was no strong reason to require bash. Let's use POSIX shell
like before the recent overhaul.

Follow-up to a459a25302

Closes #1008
This commit is contained in:
Viktor Szakats
2023-04-26 18:22:17 +00:00
parent 33dddd2f8a
commit 8890fb455f

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
# Written by Simon Josefsson
@@ -11,11 +11,13 @@ else
cmd="${cmd:-./test_ssh2}"
fi
uname="$(uname)"
d="$(dirname "$0")"
d="$(cd "${d}" || exit; pwd)" # sshd needs absolute paths
SSHD="${SSHD:-/usr/sbin/sshd}"
[[ "$(uname)" = *'_NT'* ]] && SSHD="$(cygpath -u "${SSHD}")"
[ "${uname#*_NT*}" != "${uname}" ] && SSHD="$(cygpath -u "${SSHD}")"
# for our test clients:
[ -z "${PRIVKEY}" ] && export PRIVKEY="${d}/key_rsa"
@@ -49,7 +51,7 @@ trap 'kill "${sshdpid}"; echo signal killing sshd; exit 1;' EXIT
: "started sshd (${sshdpid})"
if [[ "$(uname)" = *'_NT'* ]]; then
if [ "${uname#*_NT*}" != "${uname}" ]; then
sleep 5
else
sleep 3