Ticket #19295: orphan-haiku
File orphan-haiku, 733 bytes (added by , 32 hours ago) |
---|
Line | |
---|---|
1 | #! /bin/sh |
2 | cd /tmpfs |
3 | rm Provides.txt 2>/dev/null |
4 | rm Requires.txt 2>/dev/null |
5 | touch Provides.txt |
6 | touch Requires.txt |
7 | for i in $(ls /boot/system/packages/*.hpkg) ; do package list $i | tr ‘[A-Z]’ ‘[a-z]’ > tmp.txt ; cat tmp.txt | awk '/provides:/ { gsub("lib:",""); gsub("cmd:",""); toto = toto " "$2 ; } END {print toto;}' >> Provides.txt ; cat tmp.txt | awk '/requires:/ { gsub("lib:",""); gsub("cmd:",""); gsub("="," "); gsub("<"," "); gsub(">"," "); toto = toto "\n"$2 ; } END {print toto;}' >> Requires.txt ; done |
8 | rm tmp.txt |
9 | for i in $( cat Requires.txt |sort |uniq ) ; do grep -v $i Provides.txt > Provides2.txt; mv Provides2.txt Provides.txt ; done |
10 | cat Provides.txt | awk '{print $1;}' |
11 | rm Provides.txt |
12 | rm Requires.txt |