process-scripts.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. # Boot scripts
  3. for s in bootscripts/lfs/init.d/* \
  4. bootscripts/lfs/sysconfig/* \
  5. bootscripts/lfs/sysconfig/network-devices/* \
  6. bootscripts/lfs/sysconfig/network-devices/services/*
  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. sed -e 's/\&/\&amp\;/g' -e 's/</\&lt\;/g' -e 's/>/\&gt\;/g' \
  16. -e "s/'/\&apos\;/g" -e 's/"/\&quot\;/g' -e 's/\t/ /g' \
  17. $s > appendices/${script}.script
  18. done
  19. # Udev rules
  20. for s in udev-config/*.rules
  21. do
  22. script=$(basename $s)
  23. sed -e 's/\&/\&amp\;/g' -e 's/</\&lt\;/g' -e 's/>/\&gt\;/g' \
  24. -e "s/'/\&apos\;/g" -e 's/"/\&quot\;/g' -e 's/\t/ /g' \
  25. $s > appendices/${script}.script
  26. done