[parser] Added import command parding, added saner bad command parsing

This commit is contained in:
ayakael 2018-05-18 20:16:42 -07:00
parent 6e637133b8
commit 305e2a3631
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -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