Skip to content

Commit

Permalink
ctbcap: optimize check option non value
Browse files Browse the repository at this point in the history
  • Loading branch information
KFERMercer committed Jan 2, 2025
1 parent eb434e0 commit b56e268
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions ctbcap
Original file line number Diff line number Diff line change
Expand Up @@ -189,30 +189,15 @@ genesis_juicer() {
return 1
;;
:)
[ "${OPTARG}" = "c" ] && {
echo "(ERROR) No Cut Time Specified!" >&2
echo >&2
echo "See [ $0 -h ] for help." >&2
return 1
}
[ "${OPTARG}" = "f" ] && {
echo "(ERROR) No Recording Saving Path Specified!" >&2
echo >&2
echo "See [ $0 -h ] for help." >&2
return 1
}
[ "${OPTARG}" = "o" ] && {
echo "(ERROR) No Log Saving Path Specified!" >&2
echo >&2
echo "See [ $0 -h ] for help." >&2
return 1
}
[ "${OPTARG}" = "p" ] && {
echo "(ERROR) No Platform Specified!" >&2
echo >&2
echo "See [ $0 -h ] for help." >&2
return 1
}
case "${OPTARG}" in
c) echo "(ERROR) No Cut Time Specified!" >&2 ;;
f) echo "(ERROR) No Recording Saving Path Specified!" >&2 ;;
o) echo "(ERROR) No Log Saving Path Specified!" >&2 ;;
p) echo "(ERROR) No Platform Specified!" >&2 ;;
esac
echo >&2
echo "See [ $0 -h ] for help." >&2
return 1
;;
esac
done
Expand Down

0 comments on commit b56e268

Please sign in to comment.