From 0754c319592cd8a523959d85fb06ab23c64a98a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 20 Jul 2014 22:13:07 +0200 Subject: [PATCH] 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. --- 3rdparty/mmu_man/scripts/identify_repo.sh | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 3rdparty/mmu_man/scripts/identify_repo.sh diff --git a/3rdparty/mmu_man/scripts/identify_repo.sh b/3rdparty/mmu_man/scripts/identify_repo.sh new file mode 100755 index 0000000000..43fa3ff8b9 --- /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