mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
686 B

  1. #!/bin/sh
  2. # find package -type f -name '*.cache' | while read fn
  3. # do [ -f $1/${fn%.cache}.desc ] && cp -v $fn $1/$fn; done
  4. # cd $1; ./scripts/Create-DepDB > scripts/dep_db.txt
  5. if [ ! -d "$1" ]; then
  6. echo "Usage: $0 <targetdir>"
  7. exit 1
  8. fi
  9. find package -type f -name '*.cache' | \
  10. cut -f2,3 -d/ | sort -u | tr / ' ' | \
  11. while read rep pkg; do
  12. confdir="$1/package/$rep/$pkg"
  13. cachedir="package/$rep/$pkg"
  14. descfile="$confdir/$pkg.desc"
  15. [ -f "$descfile" ] || continue
  16. if egrep '^\[(CD|CHECKDEPS)\] <COPY> ' -q $descfile
  17. then
  18. eval "$( egrep '^\[(CD|CHECKDEPS)\] <COPY> ' $descfile | sed 's,.*>,,' )"
  19. else
  20. rm -rf $confdir/*.cache
  21. cp $cachedir/$pkg.cache $confdir/
  22. fi
  23. done