Skip to content

Commit

Permalink
♻️ Make minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
alrra committed Oct 11, 2020
1 parent 509ee4d commit 5ffbcb3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
17 changes: 8 additions & 9 deletions bin/clean-whiteboard-photos
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ clean_whiteboard_photos() {
main() {

# Check if ImageMagick's convert command-line tool is installed
if [ -x "$(command -v "convert")" ]; then

while [ $# -ne 0 ]; do
clean_whiteboard_photos "$1"
shift
done

else
if [ ! -x "$(command -v "convert")" ]; then
printf "Please install ImageMagick's 'convert' command-line tool!"
exit;
fi

while [ $# -ne 0 ]; do
clean_whiteboard_photos "$1"
shift
done

}

main $@
main "$@"
4 changes: 2 additions & 2 deletions bin/get-compression-heatmap
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ main() {

# Check if `cURL` is installed
if [ ! -x "$(command -v "curl")" ]; then
printf "Please install cURL!\n"
printf "cURL is required, please install it!\n"
exit;
fi

while [ $# -ne 0 ]; do

tmpFile="/tmp/$(mktemp -u XXXXX).gz"

# Check if the current command line arguments is a local file
# Check if the current command line argument is a local file
if [ -f "$1" ]; then
cmd="cat"

Expand Down
24 changes: 13 additions & 11 deletions bin/get-content-encoding
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

# DESCRIPTION:
#
# Provides the content encoding the specified
# resources are served with.
# Provides the content encoding the
# specified resources are served with.
#
# USAGE:
#
Expand Down Expand Up @@ -167,17 +167,19 @@ get_content_encoding() {

main() {

# Check if cURL is installed
if [ -x "$(command -v "curl")" ]; then
while [ $# -ne 0 ]; do
get_content_encoding "$1"
shift
done
printf "\n"
else
# Check if `cURL` is installed
if [ ! -x "$(command -v "curl")" ]; then
printf "cURL is required, please install it!\n"
exit;
fi

while [ $# -ne 0 ]; do
get_content_encoding "$1"
shift
done

printf "\n"

}

main $@
main "$@"

0 comments on commit 5ffbcb3

Please sign in to comment.