mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
Fix shellcheck issues
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -2,11 +2,11 @@
|
|||||||
# Based on Github Action
|
# Based on Github Action
|
||||||
# https://github.com/yshui/git-clang-format-lint
|
# https://github.com/yshui/git-clang-format-lint
|
||||||
|
|
||||||
diff=`git-clang-format --diff --commit $CI_MERGE_REQUEST_DIFF_BASE_SHA`
|
diff=$(git-clang-format --diff --commit "$CI_MERGE_REQUEST_DIFF_BASE_SHA")
|
||||||
[ "$diff" = "no modified files to format" ] && exit 0
|
[ "$diff" = "no modified files to format" ] && exit 0
|
||||||
[ "$diff" = "clang-format did not modify any files" ] && exit 0
|
[ "$diff" = "clang-format did not modify any files" ] && exit 0
|
||||||
|
|
||||||
printf "You have introduced coding style breakages, suggested changes:\n\n"
|
printf "You have introduced coding style breakages, suggested changes:\n\n"
|
||||||
|
|
||||||
echo "$diff" | colordiff
|
echo "${diff}" | colordiff
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -21,12 +21,12 @@ echo -e "${blue}Checking commit range: $CI_COMMIT_RANGE"
|
|||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
|
||||||
for commit in `git rev-list $CI_COMMIT_RANGE`; do
|
for commit in $(git rev-list "$CI_COMMIT_RANGE"); do
|
||||||
git show -s --format=%B $commit | grep "^Signed-off-by: " 2>&1 >/dev/null
|
git show -s --format=%B "$commit" | grep "^Signed-off-by: " >/dev/null 2>&1
|
||||||
ret=$?
|
ret=$?
|
||||||
if [ $ret -eq 1 ]; then
|
if [ $ret -eq 1 ]; then
|
||||||
echo -e "${red} >>> Missing Signed-off-by trailer in commit $commit"
|
echo -e "${red} >>> Missing Signed-off-by trailer in commit $commit"
|
||||||
failed=`expr $failed + 1`
|
failed=$(("$failed" + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
export CIPHER=aes128-cbc
|
export CIPHER=aes128-cbc
|
||||||
export DEST=localhost
|
export DEST=localhost
|
||||||
|
|
||||||
echo "Upload raw SSH statistics"
|
echo "Upload raw SSH statistics"
|
||||||
echo "local machine: `uname -a`"
|
echo "local machine: $(uname -a)"
|
||||||
echo "Cipher : $CIPHER ; Destination : $DEST (`ssh $DEST uname -a`)"
|
echo "Cipher : $CIPHER ; Destination : $DEST ($(ssh $DEST uname -a))"
|
||||||
echo "Local ssh version: `ssh -V 2>&1`"
|
echo "Local ssh version: $(ssh -V 2>&1)"
|
||||||
echo "Ping latency to $DEST":
|
echo "Ping latency to $DEST":
|
||||||
ping -q -c 1 -n $DEST
|
ping -q -c 1 -n $DEST
|
||||||
echo "Destination $DEST SSHD version : `echo | nc $DEST 22 | head -n1`"
|
echo "Destination $DEST SSHD version : $(echo | nc $DEST 22 | head -n1)"
|
||||||
echo "ssh login latency :`(time -f user:%U ssh $DEST 'id > /dev/null') 2>&1`"
|
echo "ssh login latency :$( (command time -f user:%U ssh $DEST 'id > /dev/null') 2>&1)"
|
||||||
./generate.py | dd bs=4096 count=100000 | time ssh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
|
./generate.py | dd bs=4096 count=100000 | time ssh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
export CIPHER=aes128-cbc
|
export CIPHER=aes128-cbc
|
||||||
export DEST=localhost
|
export DEST=localhost
|
||||||
|
|
||||||
echo "Upload raw SSH statistics"
|
echo "Upload raw SSH statistics"
|
||||||
echo "local machine: `uname -a`"
|
echo "local machine: $(uname -a)"
|
||||||
echo "Cipher : $CIPHER ; Destination : $DEST (`ssh $DEST uname -a`)"
|
echo "Cipher : $CIPHER ; Destination : $DEST ($(ssh $DEST uname -a))"
|
||||||
echo "Local ssh version: `samplessh -V 2>&1`"
|
echo "Local ssh version: $(samplessh -V 2>&1)"
|
||||||
echo "Ping latency to $DEST":
|
echo "Ping latency to $DEST":
|
||||||
ping -q -c 1 -n $DEST
|
ping -q -c 1 -n $DEST
|
||||||
echo "Destination $DEST SSHD version : `echo | nc $DEST 22 | head -n1`"
|
echo "Destination $DEST SSHD version : $(echo | nc $DEST 22 | head -n1)"
|
||||||
echo "ssh login latency :`(time -f user:%U samplessh $DEST 'id > /dev/null') 2>&1`"
|
echo "ssh login latency :$( (command time -f user:%U samplessh $DEST 'id > /dev/null') 2>&1)"
|
||||||
./generate.py | dd bs=4096 count=100000 | strace samplessh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
|
./generate.py | dd bs=4096 count=100000 | strace samplessh -c $CIPHER $DEST "dd bs=4096 of=/dev/null" 2>&1
|
||||||
|
|
||||||
|
@ -94,8 +94,8 @@ fi
|
|||||||
# when creating more keys, we need to restart the p11-kit
|
# when creating more keys, we need to restart the p11-kit
|
||||||
# so it can pick up the new keys
|
# so it can pick up the new keys
|
||||||
if [ -h "$TESTDIR/p11-kit-server.socket" ]; then
|
if [ -h "$TESTDIR/p11-kit-server.socket" ]; then
|
||||||
kill -9 $(cat $TESTDIR/p11-kit-server.pid)
|
kill -9 "$(cat "$TESTDIR/p11-kit-server.pid")"
|
||||||
rm $TESTDIR/p11-kit-server.socket
|
rm "$TESTDIR/p11-kit-server.socket"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# p11-kit complains if there is no runtime directory
|
# p11-kit complains if there is no runtime directory
|
||||||
@ -113,7 +113,7 @@ if [ $ret -ne 0 ]; then
|
|||||||
echo "$out"
|
echo "$out"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
eval $out
|
eval "$out"
|
||||||
|
|
||||||
# Symlink the p11-kit-server socket to "known place"
|
# Symlink the p11-kit-server socket to "known place"
|
||||||
P11_KIT_SERVER_ADDRESS_PATH=${P11_KIT_SERVER_ADDRESS:10}
|
P11_KIT_SERVER_ADDRESS_PATH=${P11_KIT_SERVER_ADDRESS:10}
|
||||||
|
@ -1 +1,2 @@
|
|||||||
/bin/echo -n $1 2>&1
|
#!/bin/sh
|
||||||
|
printf '%s' "$1" 2>&1
|
||||||
|
Reference in New Issue
Block a user