#!/bin/bash

# This script is to patch python binding which is using None keyword for enum. Apply this patch until ACT is fixed

current_dir=`dirname "$0"`

# Specify the python binding file path
file_path="$current_dir/../Autogenerated/Bindings/Python/Lib3MF.py"

# None is python keyword which has to be replaced
search_line="\tNone = 0"

# Replace None with BeamLatticeBallModeNone
new_line="\tBeamLatticeBallModeNone = 0"

# Use sed to find and replace the line
sed -i "s|$search_line|$new_line|" "$file_path"