From ec453eee4b64686374017a0216ad5652e5ecc4a5 Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Thu, 3 Oct 2024 12:43:37 -0600 Subject: [PATCH] Add refactor script to replace PYTHON_EXECUTABLE with Python3_EXECUTABLE in CMake code (#610) --- tribits/refactoring/to-python3.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 tribits/refactoring/to-python3.sh diff --git a/tribits/refactoring/to-python3.sh b/tribits/refactoring/to-python3.sh new file mode 100755 index 000000000..cba635390 --- /dev/null +++ b/tribits/refactoring/to-python3.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Usage: +# +# to-python3.sh +# +_SCRIPT_DIR=`echo $0 | sed "s/\(.*\)\/to-python3[.]sh/\1/g"` +baseDir=$1 +find ${baseDir} -type f \ + \( -name CMakeLists.txt -or -name "*.cmake" -or -name "*.cmake.in" -or -name "*.rst" \) \ + -exec $_SCRIPT_DIR/token-replace.py -t PYTHON_EXECUTABLE -r Python3_EXECUTABLE -f {} ';'