How to safely integrate and modernize bash programs and functions in OCaml programs?

I have a bunch of programs in bash using all related commands (awk, sed, grep, find, rsync, tar, zip, etc.). They are structured with functions. They have been working for a while but I don’t know exactly when, how and why they could fail.

1/ I would like to use them (bash programs and bash functions) immediately from OCaml programs, then progressively replace each bash program with modules/functions in OCaml when it appears to be pertinent.
I think I will put each functions in an individual script for calling them from OCaml (signature) as a bash implementation. And keep each bash program in its .sh file.
I intend to use lwt/lwt_unix to do non blocking transactions.

What are your recommendations for doing that safely as well as straightfully?
Which packages must be used to do that?
Which other packages may also be useful and for which reason?

2/ I would like to translate bash programs in OCaml programs (progressively, if it’s pertinent).
It’s basically flow control (if/then/else, case).
Are there some tools to automatically translate all or key parts of the flow control expressions from bash to OCaml?

Thanks.