Created
November 23, 2023 18:19
-
-
Save herronelou/673758662adfc826f74302f1e509006f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PLUGIN_NAME=VenetianBlinds | |
export OS=Linux | |
declare -A NUKE | |
NUKE[10_0]=/usr/local/Nuke10.0v6/include | |
NUKE[10_5]=/usr/local/Nuke10.5v6/include | |
NUKE[11_0]=/usr/local/Nuke11.0v4/include | |
NUKE[11_1]=/usr/local/Nuke11.1v2/include | |
NUKE[11_2]=/usr/local/Nuke11.2v5/include | |
NUKE[11_3]=/usr/local/Nuke11.3v2/include | |
NUKE[12_0]=/usr/local/Nuke12.0v1/include | |
NUKE[12_1]=/usr/local/Nuke12.1v1/include | |
NUKE[12_2]=/usr/local/Nuke12.2v4/include | |
NUKE[13_0]=/home/cragl/Nuke13.0v6/include | |
NUKE[14_0]=/home/cragl/Nuke14.0v1/include | |
for key in ${!NUKE[@]}; do | |
export VARIANT=${key} | |
export INCLUDE_DIR=${NUKE[${key}]} | |
echo Building $VARIANT | |
echo Using include dir $INCLUDE_DIR | |
if [[ "$VARIANT" > "11_2" ]]; then | |
export CPP_STYLE='-std=c++11' | |
export ABI='' | |
elif [[ "$VARIANT" > "13_0" ]]; then | |
export CPP_STYLE='-std=c++14' | |
export ABI='' | |
elif [[ "$VARIANT" > "14_0" ]]; then | |
export CPP_STYLE='-std=c++17' | |
export ABI='-D_GLIBCXX_USE_CXX11_ABI=0' | |
else | |
export CPP_STYLE='' | |
fi | |
gcc -shared -fPIC -I $INCLUDE_DIR $CPP_STYLE $ABI -o $PLUGIN_NAME.so $PLUGIN_NAME.cpp | |
mkdir -p $PLUGIN_NAME/$OS/${key} | |
mv $PLUGIN_NAME.so $PLUGIN_NAME/$OS/${key}/$PLUGIN_NAME.so | |
echo Finished building $VARIANT | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment