UNPKG

722 Bapplication/x-shView Raw
1# to make sure that any command that fails in turn return a non zero status and does not continue further
2
3set -e
4
5# get framework path from command line or use the current working directory as the path
6
7if [ $# -eq 0 ] ; then
8FRAMEWORK_PATH=$(pwd)/Razorpay.framework/
9echo "Using the current working directory as the framework path which is $FRAMEWORK_PATH"
10else
11FRAMEWORK_PATH=$1
12fi
13
14#navigate to the module map
15
16cd "$FRAMEWORK_PATH/Modules/"
17
18#find xcode path and replace it with the default
19
20DEFAULT_XCODE_PATH="$(xcode-select -p)"
21IFS='/'
22read -ra ARRAY <<< "$DEFAULT_XCODE_PATH"
23XCODE_COMPONENT=${ARRAY[2]}
24STRING_TO_BE_REPLACED="Xcode.app"
25sed -i '' "s/$STRING_TO_BE_REPLACED/$XCODE_COMPONENT/g" module.modulemap