diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-12 18:15:43 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-08-12 18:15:43 -0400 |
commit | ab92364bddb89547b9ea044848d3fc8afb404ca3 (patch) | |
tree | 49d6e321a1ed6e613c9fd6480e0ac596261d6a1b /osi-mk | |
parent | 5c3011d3199d00ddfdb3b4740cfaf5725ac84717 (diff) |
osi-mk: Sanity check arguments
Diffstat (limited to 'osi-mk')
-rwxr-xr-x | osi-mk | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -107,6 +107,18 @@ main() { else arg_file=$1 fi + for module in "${arg_modules[@]}"; do + if ! [[ -f $module ]]; then + error 0 'Module does not exist: %s' "$module" + arg_mode=error + fi + done + for dirspec in "${arg_directories[@]}"; do + if ! [[ -d "${dirspec%:*}" ]]; then + error 0 'Directory does not exist: %s' "${dirspec%:*}" + arg_mode=error + fi + done ;; esac fi |