I'm using cm13 on my OnePlus 3, along with systemless SuperSu and suhide. When I update cm (often), I need to flash both SuperSu and suhide. The problem is that cm comes with root access and when updating, makes a su directory in /system/bin/su that suhide detects so that it won't install. I need to delete that directory in between of the flashes, and I would like to make a script that does that for me when i flash it so that I can flash all files together on update using CyanDelta. I know that this is possible because I have seen other zips that execute command scripts as i flash them.
Find an empty flashable package somewhere; edit
META-INF/com/google/android/updater-script and add
delete_recursive("/path/to/your/directory"); to remove the directory in question.
(On second thought, is it really necessary to make a flashable zip for this single purpose? If your phone has TWRP recovery available, why not just use its built-in file manager?)