[Groonga-mysql-commit] mroonga/mroonga at 04d0ce9 [master] Use "while read" instead of "find -exec"

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jun 9 08:40:11 JST 2013


Kouhei Sutou	2013-06-09 08:40:11 +0900 (Sun, 09 Jun 2013)

  New Revision: 04d0ce9ea33824cc77ae6fc097c3f5db13fd0faa
  https://github.com/mroonga/mroonga/commit/04d0ce9ea33824cc77ae6fc097c3f5db13fd0faa

  Message:
    Use "while read" instead of "find -exec"
    
    Because dash doesn't have "export -f".

  Modified files:
    packages/yum/sign-rpm.sh

  Modified: packages/yum/sign-rpm.sh (+4 -4)
===================================================================
--- packages/yum/sign-rpm.sh    2013-06-09 08:28:27 +0900 (7460ecf)
+++ packages/yum/sign-rpm.sh    2013-06-09 08:40:11 +0900 (812ff6e)
@@ -23,14 +23,14 @@ run()
 
 get_unsigned_rpm()
 {
-    files=$(rpm --checksig $1 | grep -v 'gpg OK' | cut -d":" -f1)
-    echo $files
+    while read rpm; do
+	rpm --checksig "$rpm" | grep -v 'gpg OK' | cut -d":" -f1
+    done
 }
-export -f get_unsigned_rpm
 
 rpms=""
 for distribution in ${DISTRIBUTIONS}; do
-    rpms="${rpms} $(find ${DESTINATION}${distribution} -name '*.rpm' -exec sh -c 'get_unsigned_rpm {}' \;)"
+    rpms="${rpms} $(find ${DESTINATION}${distribution} -name '*.rpm' | get_unsigned_rpm)"
 done
 
 echo "NOTE: YOU JUST ENTER! YOU DON'T NEED TO INPUT PASSWORD!"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index