mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Work around rename command not being available in CI images
This commit is contained in:
10
.github/scripts/rename/cmake.sh
vendored
10
.github/scripts/rename/cmake.sh
vendored
@@ -4,7 +4,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# On MacOS, ensure that GNU sed and head are installed and available as `gsed`
|
# On MacOS, ensure that GNU sed and head are installed and available as `gsed`
|
||||||
# and `ghead`, respectively, and that rename is available.
|
# and `ghead`, respectively.
|
||||||
SED_COMMAND=sed
|
SED_COMMAND=sed
|
||||||
HEAD_COMMAND=head
|
HEAD_COMMAND=head
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
@@ -18,10 +18,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
HEAD_COMMAND=ghead
|
HEAD_COMMAND=ghead
|
||||||
if ! command -v rename &> /dev/null; then
|
|
||||||
echo "Error: rename is not installed. Please install it using 'brew install rename'."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This script renames CMake files from `RippleXXX.cmake` or `RippledXXX.cmake`
|
# This script renames CMake files from `RippleXXX.cmake` or `RippledXXX.cmake`
|
||||||
@@ -44,8 +40,8 @@ if [ ! -d "${DIRECTORY}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Rename the files.
|
# Rename the files.
|
||||||
rename 's/Rippled/Xrpl/g' ${DIRECTORY}/cmake/*.cmake
|
find ${DIRECTORY}/cmake -type f -name "Rippled*.cmake" -exec bash -c 'mv "${1}" "${1/Rippled/Xrpl}"' - {} \;
|
||||||
rename 's/Ripple/Xrpl/g' ${DIRECTORY}/cmake/*.cmake
|
find ${DIRECTORY}/cmake -type f -name "Ripple*.cmake" -exec bash -c 'mv "${1}" "${1/Ripple/Xrpl}"' - {} \;
|
||||||
if [ -e "${DIRECTORY}/cmake/xrpl_add_test.cmake" ]; then
|
if [ -e "${DIRECTORY}/cmake/xrpl_add_test.cmake" ]; then
|
||||||
mv "${DIRECTORY}/cmake/xrpl_add_test.cmake" "${DIRECTORY}/cmake/XrplAddTest.cmake"
|
mv "${DIRECTORY}/cmake/xrpl_add_test.cmake" "${DIRECTORY}/cmake/XrplAddTest.cmake"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user