diff --git a/sync.sh b/sync.sh index f6a850e..79b7d1f 100755 --- a/sync.sh +++ b/sync.sh @@ -57,6 +57,14 @@ main() { bool "$RUN_CMDS" && _run_cmds } +err_handler() { + echo "Something went wrong!" + echo "You can look at what went wrong by running this script more verbosely" + echo "Sorry!" +} + +trap err_handler ERR + echo "# exec: start." bool ${TIME_TRACK:-no} && time main "$@" || main "$@" echo "# exec: done."