-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from weaveworks/shell-lint
Shell lint
- Loading branch information
Showing
14 changed files
with
165 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Find all files with a given MIME type. | ||
# | ||
# e.g. | ||
# $ files-with-type text/x-shellscript k8s infra | ||
# | ||
# Assumes `find`, `xargs`, and `file` are all installed. | ||
|
||
mime_type=$1 | ||
shift | ||
|
||
find "$@" -print0 -type f |xargs -0 file --mime-type | grep "${mime_type}" | sed -e 's/:.*$//' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
#! /bin/bash | ||
|
||
# shellcheck disable=SC1091 | ||
. ./config.sh | ||
|
||
set -e | ||
|
||
whitely echo Ping each host from the other | ||
for host in $HOSTS; do | ||
for other in $HOSTS; do | ||
[ $host = $other ] || run_on $host $PING $other | ||
[ "$host" = "$other" ] || run_on "$host" "$PING" "$other" | ||
done | ||
done | ||
|
||
whitely echo Check we can reach docker | ||
|
||
for host in $HOSTS; do | ||
echo | ||
echo Host Version Info: $host | ||
echo ===================================== | ||
echo "Host Version Info: $host" | ||
echo "=====================================" | ||
echo "# docker version" | ||
docker_on $host version | ||
docker_on "$host" version | ||
echo "# docker info" | ||
docker_on $host info | ||
docker_on "$host" info | ||
echo "# weave version" | ||
weave_on $host version | ||
weave_on "$host" version | ||
done |
Oops, something went wrong.