Improve install-uninstall-check task scripts

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Gone away
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Build, Testing
    • None
    • Not Needed
    • 🔵 Done
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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.

            Assignee:
            Unassigned
            Reporter:
            Roberto Sanchez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: