3 Replies Latest reply on Jun 1, 2015 6:54 PM by CMata_Intel

    Bug in edison-image-ww18-15 flashall.sh

    jbromley

      Hello,

       

      I believe I have found a bug in the flashall.sh script for edison-image-ww18-15 for Linux. In line 17 of the script there is code that tries to escape spaces in the path with backslashes.

       

      ESC_BASE_DIR=${BASE_DIR/' '/'\ '}

       

      However, as written this will only escape the first space in the path. To escape all spaces in the path you need the following code:

       

      ESC_BASE_DIR=${BASE_DIR//' '/'\ '}

       

      Note there are two slashes after BASE_DIR. This will properly escape all spaces in the path. I attach a patch for this fix.

       

      Regards,

      Jay Bromley

        • 1. Re: Bug in edison-image-ww18-15 flashall.sh
          CMata_Intel

          Hi jbromley

           

          Thank you very much for bringing this up, we will check the script and your recommendation.

          I want to know if you have had problems running the script at this time.

           

          Kind regards;

          CMata

          • 2. Re: Bug in edison-image-ww18-15 flashall.sh
            jbromley

            Hi @CMata,

             

            I personally did not have problems with the script since I do not use paths with spaces. I just happened to be looking through the script comparing it to the flashing script from another Linux distribution and noticed that as written the script will escape only the first space. One would be extremely lucky to run this on a system that has spaces in path names and not have problems as the bash interpreter will take the path as two tokens unless the text is quoted properly. Fixing the script as the patch shows ensures you don't have to hope that the path name is properly quoted everywhere.

             

            Regards,

            Jay

            • 3. Re: Bug in edison-image-ww18-15 flashall.sh
              CMata_Intel

              Hi Jay;

               

              Fortunately you didn't have problems with the script.

              Thank you very much for your suggestion, we have already forward this to the appropriate team. I encourage you to keep posting your feedback and suggestions in the communities

               

               

              Kind regards;

              CMata