9 #check if package exists
11 echo -n > ..
/.rem_cache.tmp1
12 echo -n > ..
/.rem_cache.tmp2
13 echo -n > ..
/.rem_cache.tmp1.
sort
14 echo -n > ..
/.rem_cache.tmp2.
sort
15 #echo "Getting dependencies..."
18 if test -s ..
/.rem_cache.tmp1.
sort; then
19 cp ..
/.rem_cache.tmp1.
sort ..
/.rem_cache.tmp1
20 for i
in `cut -d / -f 1 ../.rem_cache.tmp1.sort | sort -u`; do
21 echo "$LS" |
xargs grep "^$i$" >> ..
/.rem_cache.tmp1
23 sort -u ..
/.rem_cache.tmp1
> ..
/.rem_cache.tmp1.
sort
26 echo "$LS" |
xargs grep "^$i$" >> ..
/.rem_cache.tmp1
28 if ! test -s ..
/.rem_cache.tmp1
; then
32 sort -u ..
/.rem_cache.tmp1
> ..
/.rem_cache.tmp1.
sort
34 if cmp ..
/.rem_cache.tmp1.
sort ..
/.rem_cache.tmp2.
sort > /dev
/null
2>&1; then
37 cp ..
/.rem_cache.tmp1.
sort ..
/.rem_cache.tmp2.
sort
50 if [ "$OPKG" != "$PKG" ]; then
51 if [ -z "$OPKG" ]; then
54 echo "$OPKG/depends:$DEPP"
59 [ -z "$DEPP" ] && DEPP
="$DEP" || DEPP
="$DEPP $DEP"
61 done < .rem_cache.tmp1.
sort > .rem_cache.tmp1.sort4
62 echo "$PKG/depends:$DEPP" >> .rem_cache.tmp1.sort4
65 cut
-d / -f 1 .rem_cache.tmp1.
sort |
sort -u > .rem_cache.tmp1.sort1
66 cut
-d : -f 2 .rem_cache.tmp1.
sort |
sort -u > .rem_cache.tmp1.sort2
67 cat .rem_cache.tmp1.sort1 .rem_cache.tmp1.sort2 |
sort -u > .rem_cache.tmp1.sort3
68 DIFF
=`comm -13 --nocheck-order .rem_cache.tmp1.sort1 .rem_cache.tmp1.sort3`
70 echo "$i/depends:" >> .rem_cache.tmp1.sort4
79 done < .rem_cache.tmp1.sort4
82 orig_maxindex
=$
(( ${#list[@]} - 1 ))
84 while (( ${#list[@]} != 0 )); do
86 if [[ -z "${list[$num]}" ]]; then
87 [[ "$num" -lt "$orig_maxindex" ]] && num
=$
(( "$num" + 1 )) || num
=0
90 name
="${list[$num]%%/*}"
91 depends
="${list[$num]#*:}"
94 [[ "$name" == "$i" ]] && echo "$i----$i----$i"
95 if ! echo "$processed" |
grep -q "^$i$"; then
100 if [[ -z "$deperror" ]]; then
101 [[ -z "$processed" ]] && processed
="$name" || processed
=`echo -ne "$processed\n$name"`
105 [[ "$num" -lt "$orig_maxindex" ]] && num
=$
(( $num + 1 )) || num
=0
108 reverse
=`echo "$processed" | tac`