Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [[ ${Configuration} == "debug" ]]; then
- echo -e "Current COMPILE_OPTS:
- $( grep '^COMPILE_OPTS.*' ${BUILD_DIR}/config.linux-with-shared-libraries) )"
- if [[ $(grep '^COMPILE_OPTS.*-O2' ${BUILD_DIR}/config.linux-with-shared-libraries) != "" ]]; then
- echo -e "FOUND WRONG FLAG; REPLACE"
- sed -i 's+-O2+-O0+g' ${BUILD_DIR}/config.linux-with-shared-libraries
- elif [[ $(grep '^COMPILE_OPTS.*-O0' ${BUILD_DIR}/config.linux-with-shared-libraries) ]]; then
- echo -e "FOUND CORRECT FLAG; DO NOTHING"
- else
- echo -e "ADD FLAG"
- sed -i 's+^COMPILE_OPTS\(.*\)+COMPILE_OPTS\1 -O0+g' ${BUILD_DIR}/config.linux-with-shared-libraries
- fi
- COMPILE_OPTS="$(grep '^COMPILE_OPTS.*-g$' ${BUILD_DIR}/config.linux-with-shared-libraries)"
- if [[ ${COMPILE_OPTS} == "" ]]; then
- echo -e "Adding debug flag into COMPILE_OPTS"
- sed -i 's+^COMPILE_OPTS\(.*\)+COMPILE_OPTS\1 -g+g' ${BUILD_DIR}/config.linux-with-shared-libraries
- echo -e $(grep '^COMPILE_OPTS.*-g$' ${BUILD_DIR}/config.linux-with-shared-libraries)
- fi
- fi
Add Comment
Please, Sign In to add comment