docs/ikteam: Delete most files.
[haiku.git] / 3rdparty / mmu_man / scripts / identify_repo.sh
blob43fa3ff8b969a43c8655fb9d36da0883f4e04d9b
1 #!/bin/bash
3 # for each package in /system/packages/ check which repository it comes from
5 # actually reverse video
6 #bold=`tput smso`
7 #offbold=`tput rmso`
9 # show only not found
10 onf=0
11 if [ "x$1" == "x-n" ]; then
12 onf=1
15 cd /system/packages/
17 repos=""
18 for r in /system/settings/package-repositories/*; do
19 repos="$repos ${r##*/}"
20 u=`sed '/^url=/s/url=//g;q' "$r"`
21 urls="$urls $u"
22 done
23 reponames=($repos)
24 repourls=($urls)
26 for p in *.hpkg; do
27 #echo "$p"
28 i=0
29 found=0
30 while [ $i -lt ${#reponames[@]} ]; do
31 #echo "Checking repo ${reponames[$i]}..."
32 #echo "${repourls[$i]}"
33 if wget -q --spider "${repourls[$i]}/packages/$p" ; then
34 [ "$onf" == 1 ] || echo "$p in ${reponames[$i]}";
35 found=1
36 break
38 let i=i+1
39 done
40 if [ $found != 1 ]; then
41 echo "${bold}$p NOT FOUND${offbold}"
43 done