aboutsummaryrefslogtreecommitdiffstats
path: root/process-scripts.sh
blob: dbd5039bb870bbded0453ab9f6a2533a6375798b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

# Boot scripts
for s in bootscripts/lfs/init.d/*       \
         bootscripts/lfs/sysconfig/*    \
         bootscripts/lfs/lib/services/* \
         bootscripts/lfs/sbin/*         \
         udev-lfs/*.rules
do
  script=$(basename $s)

  # Skip directories
  [ $script == 'network-devices' ] && continue
  #[ $script == 'services'        ] && continue

  # Disambiguate duplicate file names
  [ $s == 'bootscripts/lfs/sysconfig/rc'         ] && script='rc-sysinit';
  [ $s == 'bootscripts/lfs/sysconfig/modules'    ] && script='modules-sysinit';
  [ $s == 'bootscripts/lfs/sysconfig/udev_retry' ] && script='config-udev-retry';

  sed  -e 's/\&/\&amp\;/g' -e 's/</\&lt\;/g'   -e 's/>/\&gt\;/g' \
       -e "s/'/\&apos\;/g" -e 's/"/\&quot\;/g' -e 's/\t/    /g'  \
       $s > appendices/${script}.script
done