[rkward] macports: suppressed warnings in bundle script

m.eik michalke null at kde.org
Thu Apr 5 13:00:36 UTC 2018


Git commit 6dd07a0d9d8cf7ebbaf6d262938568f56ca1a67b by m.eik michalke.
Committed on 05/04/2018 at 12:59.
Pushed by meikm into branch 'master'.

suppressed warnings in bundle script

M  +5    -7    macports/update_bundle.sh

https://commits.kde.org/rkward/6dd07a0d9d8cf7ebbaf6d262938568f56ca1a67b

diff --git a/macports/update_bundle.sh b/macports/update_bundle.sh
index 345bf472..9c546daf 100755
--- a/macports/update_bundle.sh
+++ b/macports/update_bundle.sh
@@ -542,22 +542,20 @@ fi
 # remove static libraries, they're a waste of disk space
 if $RMSTLIBS ; then
   echo -e "deleting all static libs in ${TXT_BLUE}${MPTINST}/lib/${OFF}..."
-  sudo rm ${MPTINST}/lib/*.a
+  sudo rm ${MPTINST}/lib/*.a 2>/dev/null
   echo -e "deleting all static libs in ${TXT_BLUE}${MPTINST}/var/macports/build${OFF}..."
   #find "${MPTINST}/var/macports/build" -name "*.a" -exec sudo rm \{\} \;
   # only remove libs in destroot/libs/
-  find -E "${MPTINST}/var/macports/build" -type f -regex '.*/destroot'${MPTINST}'/lib/[^/]*\.a' -exec sudo rm \{\} \;
+  find -E "${MPTINST}/var/macports/build" -type f -regex '.*/destroot'${MPTINST}'/lib/[^/]*\.a' -exec sudo rm \{\} 2>/dev/null \;
   alldone
 fi
 
 # list disk usage of ports
 if $LSDSKUSG ; then
   cd "${MPTINST}/var/macports/build/"
-  SBFLDRS=$(ls)
-  for i in ${SBFLDRS} ; do
-    if [ -d "${i}/$(ls ${i}/)/work/destroot" ] ; then
-      echo $(du -sh ${i}/$(ls ${i}/)/work/destroot | sed -e "s+\(${BLDPRFX}\)\(.*\)\(/work/destroot\)+\2+")
-    fi
+  DESTROOTS=$(find . -type d -name "destroot" 2>/dev/null)
+  for i in ${DESTROOTS} ; do
+    echo $(du -sh ${i} | sed -e "s+\(${BLDPRFX}\)\(.*\)\(/work/destroot\)+\2+")
   done
 fi
 



More information about the rkward-tracker mailing list