# HG changeset patch # User Ryan Pavlik # Date 1336412430 18000 # Node ID 6748072ffec9560b4d4ad4e97c175701fc0bdbb9 # Parent 18ccf1818b74da7b4fb001e1de9418a789c5ea8b Patch tool: replace elifs with case. Also handles errors. diff -r 18ccf1818b74 -r 6748072ffec9 tools/patch-tool-mxe --- a/tools/patch-tool-mxe Wed Apr 25 19:25:45 2012 -0500 +++ b/tools/patch-tool-mxe Mon May 07 12:40:30 2012 -0500 @@ -73,10 +73,26 @@ git am --keep-cr } -if [ "$cmd" == "init" ]; then - init_git $pkg -elif [ "$cmd" == "import" ]; then - import_patch $pkg -elif [ "$cmd" == "export" ]; then - export_patch $pkg -fi +case "$cmd" in + init) + init_git $pkg + ;; + import) + import_patch $pkg + ;; + export) + export_patch $pkg + ;; + *) + echo "Unrecognized command '${cmd}'" >&2 + cat <