[parser] Added import command parding, added saner bad command parsing
This commit is contained in:
parent
6e637133b8
commit
305e2a3631
1 changed files with 23 additions and 0 deletions
23
src/parser
23
src/parser
|
@ -46,6 +46,25 @@ case "${1}" in
|
|||
[[ ${EXIT} -eq 2 ]] && echo "Init had errors"
|
||||
;;
|
||||
|
||||
import)
|
||||
shift
|
||||
case "${1}" in
|
||||
tracks)
|
||||
shift
|
||||
cmd_import_tracks "${GIT_DIR}" ${@}
|
||||
;;
|
||||
|
||||
images)
|
||||
shift
|
||||
cmd_import_images "${GIT_DIR}" ${@}
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "${1} not a valid command"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
exclude)
|
||||
shift
|
||||
cmd_exclude "${GIT_DIR}" ${@}
|
||||
|
@ -153,5 +172,9 @@ case "${1}" in
|
|||
[[ ${EXIT} -eq 3 ]] && echo "Database file non-existent"
|
||||
[[ ${EXIT} -eq 2 ]] && echo "Git directory not a valid git repository"
|
||||
;;
|
||||
|
||||
*)
|
||||
help_general
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue