linux template files

This commit is contained in:
julian 2024-05-23 17:23:35 -06:00
parent 3e91bd7191
commit b89e07118c
4 changed files with 20 additions and 3 deletions

3
.gitignore vendored
View file

@ -80,3 +80,6 @@ secp256k1.dll
/ios/Runner/Info.plist
/ios/Runner.xcodeproj/project.pbxproj
/ios/Runner/Assets.xcassets/AppIcon.appiconset
/linux/CMakeLists.txt
/linux/my_application.cc

View file

@ -2,6 +2,20 @@
set -x -e
F0="linux/CMakeLists.txt"
F1="linux/my_application.cc"
TEMPLATES="${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates"
for (( i=0; i<=1; i++ )); do
VAR="F${i}"
FILE="${APP_PROJECT_ROOT_DIR}/${!VAR}"
if [ -f "${FILE}" ]; then
rm "${FILE}"
fi
cp "${TEMPLATES}/${!VAR}" "${FILE}"
done
# Configure Linux for Duo.
sed -i "s/${APP_BASIC_NAME_PLACEHOLDER}/${NEW_BASIC_NAME}/g" "${APP_PROJECT_ROOT_DIR}/linux/CMakeLists.txt"
sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/linux/my_application.cc"
sed -i "s/${APP_BASIC_NAME_PLACEHOLDER}/${NEW_BASIC_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F0}"
sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F1}"