[CDRIVER-2924] Improve install-uninstall-check task scripts Created: 15/Jan/19  Updated: 09/Feb/23

Status: Backlog
Project: C Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Roberto Sanchez Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CDRIVER-2733

 Description   

Based on a recommendation from samantha.ritter, it would be good to update .evergreen/install-uninstall-check.sh and .evergreen/install-uninstall-check-windows.cmd to replace repetitive blocks of code with something more concise and maintainable. The recommended structure is something like this:

uninstall_files=(
   $INSTALL_DIR/share/mongo-c-driver/uninstall-bson.sh
   $INSTALL_DIR/share/mongo-c-driver/uninstall.sh
   ...
)
 
for file in "${uninstall_files[@]}"
do
   if test -f $file; then
      echo "$file found!"
      exit 1
   else
      echo "$file check ok"
   fi
done

This originally was brought up in discussion of CDRIVER-2849.


Generated at Wed Feb 07 21:16:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.