bug 1438906: quote more things in the update verify scripts to get rid of some non-fatal errors. r=rail
authorBen Hearsum <bhearsum@mozilla.com>
Tue, 20 Feb 2018 09:59:18 -0500
changeset 8295 8aa05653358c
parent 8294 d31b525642ba
child 8297 f7bde461541e
child 8303 5c6a309e8de1
push id6063
push userbhearsum@mozilla.com
push dateTue, 20 Feb 2018 14:59:52 +0000
reviewersrail
bugs1438906
bug 1438906: quote more things in the update verify scripts to get rid of some non-fatal errors. r=rail
release/common/check_updates.sh
release/common/unpack.sh
--- a/release/common/check_updates.sh
+++ b/release/common/check_updates.sh
@@ -60,17 +60,18 @@ check_updates () {
       update_abspath="$two_backslash_pwd\\update"
     else
       # not windows
       # use ls here, because mac uses *.app, and we need to expand it
       cwd=$(ls -d $PWD/source/$platform_dirname)
       update_abspath="$PWD/update"
     fi
 
-    cd source/$platform_dirname
+    cd_dir=$(ls -d $PWD/source/$platform_dirname)
+    cd "$cd_dir"
     set -x
     "$updater" "$update_abspath" "$cwd" "$cwd" 0
     set +x
     cd ../..
   else
     echo "FAIL: no dir in source/$platform_dirname"
     return 1
   fi
--- a/release/common/unpack.sh
+++ b/release/common/unpack.sh
@@ -30,20 +30,21 @@ unpack_build () {
                 ../common/unpack-diskimage.sh "$pkg_file" mnt $dir_name
             else
                 7z x ../"$pkg_file" > /dev/null
                 if [ `ls -1 | wc -l` -ne 1 ]
                 then
                     echo "Couldn't find .app package"
                     return 1
                 fi
-                unpack_dir=`ls -1`
+                unpack_dir=$(ls -1)
+                unpack_dir=$(ls -d $unpack_dir)
                 mv "${unpack_dir}"/*.app .
-                rm -rf $unpack_dir
-                appdir=`ls -1`
+                rm -rf "$unpack_dir"
+                appdir=`ls -1d *.app`
                 # The updater guesses the location of these files based on
                 # its own target architecture, not the mar. If we're not
                 # unpacking mac-on-mac, we need to copy them so it can find
                 # them. It's important to copy (and not move), because when
                 # we diff the installer vs updated build afterwards, the
                 # installer version will have them in their original place.
                 cp "${appdir}/Contents/Resources/update-settings.ini" "${appdir}/update-settings.ini"
                 cp "${appdir}/Contents/Resources/precomplete" "${appdir}/precomplete"