[haiku-commits] haiku: hrev47533 - 3rdparty/mmu_man/scripts

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 20 Jul 2014 22:26:39 +0200 (CEST)

hrev47533 adds 1 changeset to branch 'master'
old head: e0650f25c3c86e40fdb02a05714b73560d2b2328
new head: 0754c319592cd8a523959d85fb06ab23c64a98a6
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=0754c31+%5Ee0650f2

----------------------------------------------------------------------------

0754c31: Add a simple script to identify where packages come from
  
  There is probably a simpler way, but it helps finding
  which packages were installed manually.

                                          [ François Revol <revol@xxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47533
Commit:      0754c319592cd8a523959d85fb06ab23c64a98a6
URL:         http://cgit.haiku-os.org/haiku/commit/?id=0754c31
Author:      François Revol <revol@xxxxxxx>
Date:        Sun Jul 20 20:13:07 2014 UTC

----------------------------------------------------------------------------

1 file changed, 43 insertions(+)
3rdparty/mmu_man/scripts/identify_repo.sh | 43 +++++++++++++++++++++++++++

----------------------------------------------------------------------------

diff --git a/3rdparty/mmu_man/scripts/identify_repo.sh 
b/3rdparty/mmu_man/scripts/identify_repo.sh
new file mode 100755
index 0000000..43fa3ff
--- /dev/null
+++ b/3rdparty/mmu_man/scripts/identify_repo.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+# for each package in /system/packages/ check which repository it comes from
+
+# actually reverse video
+#bold=`tput smso`
+#offbold=`tput rmso`
+
+# show only not found
+onf=0
+if [ "x$1" == "x-n" ]; then
+onf=1
+fi
+
+cd /system/packages/
+
+repos=""
+for r in /system/settings/package-repositories/*; do
+       repos="$repos ${r##*/}"
+       u=`sed '/^url=/s/url=//g;q' "$r"`
+       urls="$urls $u"
+done
+reponames=($repos)
+repourls=($urls)
+
+for p in *.hpkg; do
+       #echo "$p"
+       i=0
+       found=0
+       while [ $i -lt ${#reponames[@]} ]; do
+               #echo "Checking repo ${reponames[$i]}..."
+               #echo "${repourls[$i]}"
+               if wget -q --spider "${repourls[$i]}/packages/$p" ; then
+                       [ "$onf" == 1 ] || echo "$p in ${reponames[$i]}";
+                       found=1
+                       break
+               fi
+               let i=i+1
+       done
+       if [ $found != 1 ]; then
+               echo "${bold}$p NOT FOUND${offbold}"
+       fi
+done


Other related posts:

  • » [haiku-commits] haiku: hrev47533 - 3rdparty/mmu_man/scripts - revol