The script is executed on the host machine. For this i think it would be better if it can be executed on the fwcloud server. So basically a pre-compile / pre-install hook.
If there any documentation about the context the scripts are executed. What location. What files are accessible etc. Can it stop the execution etc.