Move the docker related content to a better folder

This commit is contained in:
Raymond Tau
2019-03-21 22:48:17 +08:00
parent f070c76417
commit 98414fa447
16 changed files with 7 additions and 7 deletions

View File

@@ -0,0 +1,42 @@
#!/bin/bash
set -e
usage() {
cat <<EOL
USAGE: $(basename $0) url
OPTIONS:
-h, --help
EOL
exit 1
}
main() {
local argc=0
local argv=()
while [ $# -gt 0 ]; do
case $1 in
-h|--help)
usage
;;
*)
argc=`expr $argc + 1`
argv+=($1)
;;
esac
shift
done
if [ $argc -lt 1 ]; then
echo "Too few arguments"
exit 1
fi
url=${argv[0]}
http_status_code=`curl -s -w "%{http_code}" -o /dev/null $url`
echo $http_status_code
}
main $*