process-scripts.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. # Boot scripts
  3. for s in bootscripts/lfs/init.d/* \
  4. bootscripts/lfs/sysconfig/* \
  5. bootscripts/lfs/lib/services/* \
  6. bootscripts/lfs/sbin/*
  7. do
  8. script=$(basename $s)
  9. # Skip directories
  10. [ $script == 'network-devices' ] && continue
  11. #[ $script == 'services' ] && continue
  12. # Disambiguate duplicate file names
  13. [ $s == 'bootscripts/lfs/sysconfig/rc' ] && script='rc-sysinit';
  14. [ $s == 'bootscripts/lfs/sysconfig/modules' ] && script='modules-sysinit';
  15. [ $s == 'bootscripts/lfs/sysconfig/udev_retry' ] && script='config-udev-retry';
  16. sed -e 's/\&/\&amp\;/g' -e 's/</\&lt\;/g' -e 's/>/\&gt\;/g' \
  17. -e "s/'/\&apos\;/g" -e 's/"/\&quot\;/g' -e 's/\t/ /g' \
  18. $s > appendices/${script}.script
  19. done
  20. # Udev rules
  21. for s in udev-config/*.rules
  22. do
  23. script=$(basename $s)
  24. sed -e 's/\&/\&amp\;/g' -e 's/</\&lt\;/g' -e 's/>/\&gt\;/g' \
  25. -e "s/'/\&apos\;/g" -e 's/"/\&quot\;/g' -e 's/\t/ /g' \
  26. $s > appendices/${script}.script
  27. done