download_externals: Fix issue with re-install
authorGeorge Joseph <gjoseph@digium.com>
Tue, 27 Sep 2016 21:10:37 +0000 (15:10 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 27 Sep 2016 21:13:13 +0000 (16:13 -0500)
Needed to ignore an xmlstarlet return code for optional element.

Change-Id: I6a96f709b4b38c9a3f3dda4e8b07903787e16873
Reported-by: Dan Jenkins

build_tools/download_externals

index 9b2b841..2bc357c 100755 (executable)
@@ -134,7 +134,7 @@ if [[ -f ${DESTDIR}${ASTMODDIR}/${module_name}.manifest.xml ]] ; then
                sums=$(${XMLSTARLET} sel -t -m "//file" -v "@md5sum" -n ${DESTDIR}${ASTMODDIR}/${module_name}.manifest.xml)
                for sum in ${sums} ; do
                        install_path=$(${XMLSTARLET} sel -t -v "//file[@md5sum = '${sum}']/@install_path" ${DESTDIR}${ASTMODDIR}/${module_name}.manifest.xml )
-                       executable=$(${XMLSTARLET} sel -t -v "//file[@md5sum = '${sum}']/@executable" ${DESTDIR}${ASTMODDIR}/${module_name}.manifest.xml )
+                       executable=$(${XMLSTARLET} sel -t -v "//file[@md5sum = '${sum}']/@executable" ${DESTDIR}${ASTMODDIR}/${module_name}.manifest.xml || : )
                        f=${DESTDIR}$(eval echo ${install_path})
                        if [[ ! -f ${f} ]] ; then
                                echo Not found: ${f}