File size: 950 Bytes
9d54b72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# This script is used to fix the generated Python REST client code

# Order of operations matters here, so we need to ensure that the imports are correctly handled.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pushd "${SCRIPT_DIR}" || { echo "Failed to change directory to ${SCRIPT_DIR}"; exit 1; }
INIT_FILE="../python-restclient/vcell_client/models/__init__.py"

sed -i '' '/^from vcell_client.models.analytic_curve import AnalyticCurve$/d' $INIT_FILE && \
echo 'from vcell_client.models.analytic_curve import AnalyticCurve' >> $INIT_FILE

sed -i '' '/^from vcell_client.models.composite_curve import CompositeCurve$/d' $INIT_FILE && \
echo 'from vcell_client.models.composite_curve import CompositeCurve' >> $INIT_FILE

sed -i '' '/^from vcell_client.models.control_point_curve import ControlPointCurve$/d' $INIT_FILE && \
echo 'from vcell_client.models.control_point_curve import ControlPointCurve' >> $INIT_FILE

popd