Display usage when no arguments supplied
This commit is contained in:
parent
c86f125ed3
commit
473d88b3c9
5
tag.sh
5
tag.sh
|
@ -22,7 +22,7 @@ SCRIPT_NAME=$(basename "$0")
|
|||
|
||||
|
||||
DB_FILE="${PWD}/tags.db"
|
||||
[ "$1" = "--db" ] && DB_FILE="$2" && shift 2
|
||||
[ "${1:-}" = "--db" ] && DB_FILE="$2" && shift 2
|
||||
|
||||
|
||||
DB_SCHEMA="${SCRIPT_DIR}/database.sql"
|
||||
|
@ -166,6 +166,9 @@ add_path_auto() {
|
|||
}
|
||||
|
||||
main() {
|
||||
|
||||
[ -z "${1:-}" ] && fail "Usage: tag init/add/import/autoimport/list/listtags"
|
||||
|
||||
if [[ "$1" = "init" ]]; then
|
||||
init "${2:-$DB_FILE}"
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue