Replace this part:
if [[ "$PB_FORCE_DD_FLASH" = "true" ]]; then
cp -R "$PB_VENDOR/updater/update-binary-dd" "$PB_WORK_DIR/META-INF/com/google/android/update-binary"
else
cp -R "$PB_VENDOR/updater/update-binary" "$PB_WORK_DIR/META-INF/com/google/android/update-binary"