pkgsinlivecd 1.3 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. #Barry Kauler, May 2010
  3. #this script removes the package names that are in the "devx" SFS file, not in
  4. #the live-CD. On stdout is printed the package name and version on each line,
  5. #of files in the live-CD.
  6. #this script works for all puppies built with Woof.
  7. . /root/.packages/DISTRO_PKGS_SPECS
  8. DEVXONLY="`echo "$PKGS_SPECS_TABLE" | grep 'exe>dev' | grep '^yes' | cut -f 2 -d '|'`"
  9. # cat /root/.packages/woof-installed-packages |
  10. cp -f /root/.packages/woof-installed-packages /tmp/woof-installed-packages
  11. for ONEDEVX in $DEVXONLY
  12. do
  13. dPATTERN="|${ONEDEVX}|"
  14. grep -v "$dPATTERN" /tmp/woof-installed-packages > /tmp/woof-installed-packages2
  15. mv -f /tmp/woof-installed-packages2 /tmp/woof-installed-packages
  16. done
  17. grep -v -i '_dev' /tmp/woof-installed-packages > /tmp/woof-installed-packages2
  18. mv -f /tmp/woof-installed-packages2 /tmp/woof-installed-packages
  19. #grep -v '^gcc' /tmp/woof-installed-packages > /tmp/woof-installed-packages2
  20. #mv -f /tmp/woof-installed-packages2 /tmp/woof-installed-packages
  21. sort -u /tmp/woof-installed-packages > /tmp/woof-installed-packages2
  22. mv -f /tmp/woof-installed-packages2 /tmp/woof-installed-packages
  23. LIVECDPKGS="`cat /tmp/woof-installed-packages | cut -f 2,3 -d '|' | tr '|' ' ' | sed -e 's%\-q1$%%' -e 's%\-p4$%%'`"
  24. echo "$LIVECDPKGS"