Implemented --help

This commit is contained in:
Sun Knudsen 2021-05-01 07:09:23 -04:00
parent 894ce0c1cc
commit 0fe0f28807
No known key found for this signature in database
GPG Key ID: 1FA767862BBD1305
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
#! /bin/bash
if [ -z "$1" ]; then
if [ -z $1 ] || [ $1 = "--help" ]; then
printf "%s\n" "Usage: app-cleaner.sh /path/to/app.app"
exit 1
exit 0
fi
IFS=$'\n'

View File

@ -85,9 +85,9 @@ function kill-apps() {
IFS=$'\n'
red=$(tput setaf 1)
normal=$(tput sgr0)
if [ -z "$1" ]; then
if [ -z $1 ] || [ $1 = "--help" ]; then
printf "%s\n" "Usage: kill-apps string"
return 1
return 0
fi
printf "%s\n" "Finding apps that match “$1”…"
sleep 1