-
Notifications
You must be signed in to change notification settings - Fork 543
CXX-2988 Use Bash and shebangs whenever able #1179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Forgot to push updated commits prior to posting PR: rebased accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a few minor tweaks (consistent spacing before opening parenthesis)
generate_uninstall/CMakeLists.txt
Outdated
|
||
# Ensure generated uninstall script has executable permissions. | ||
if (\"${CMAKE_VERSION}\" VERSION_GREATER_EQUAL \"3.19.0\") | ||
file( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file( | |
file ( |
generate_uninstall/CMakeLists.txt
Outdated
) | ||
else () | ||
# Workaround lack of file(CHMOD). | ||
file( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file( | |
file ( |
generate_uninstall/CMakeLists.txt
Outdated
GROUP_READ GROUP_EXECUTE | ||
WORLD_READ WORLD_EXECUTE | ||
) | ||
file(RENAME \"${UNINSTALL_PROG}.d/${UNINSTALL_PROG}\" \"${UNINSTALL_PROG}\") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file(RENAME \"${UNINSTALL_PROG}.d/${UNINSTALL_PROG}\" \"${UNINSTALL_PROG}\") | |
file (RENAME \"${UNINSTALL_PROG}.d/${UNINSTALL_PROG}\" \"${UNINSTALL_PROG}\") |
Resolves CXX-2988. Verified by this patch.
Companion PR to mongodb/mongo-c-driver#1680.
Additionally removes some stray env vars and a long-broken
sed
command in theuninstall_check
tasks due to a combination of CXX-2753 (directory restructure) and CXX-2809 (removal of legacy CMake packages).The
etc/generate_uninstall.sh
script is excluded from the shebang update tobash
. It remains ansh
script due to incompatibilities with how Bash escapes a sequence of backslashes\\\\
in strings. This results in incorrect contents of the generateduninstall.sh
file. The following diffs are examples of incorrect changes produced bysh
->bash
:Missing escape backslashes:
Failure to expand newlines prior to sort and iteration:
Refactoring the
etc/generate_uninstall.sh
script to be Bash-compatible (or revisiting its method of generation entirely) is deferred to CXX-3073.