-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate.sh
22 lines (20 loc) · 823 Bytes
/
generate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
script_folder="$(dirname ${BASH_SOURCE[0]})"
source "$(realpath -s $script_folder/global_conf.sh)"
source "$arr_maker"
# Comparisson arrays
arr_ref_chars=("desi" "code" "extra") # Reference files names
for rep_type in ${arr_ref_chars[@]}
do
make_arr "/home/glamax-13/Smithy/repos_center/git_bash_utils/scripts/replacer_legacy/html/src/$rep_type-clean.regist"; clean=( "${clean[@]}" "${MAKE_ARR_RET[@]}" )
make_arr "/home/glamax-13/Smithy/repos_center/git_bash_utils/scripts/replacer_legacy/html/src/$rep_type-dirty.regist"; dirty=( "${dirty[@]}" "${MAKE_ARR_RET[@]}" )
done
echo "${#clean[@]} and ${#dirty[@]}"
j=0
while [ $j -lt ${#clean[@]} ] #Looping over all known HTML characters
do
selector=${dirty[$j]}
replacer=${clean[$j]}
echo "s/$selector/$replacer/g" >> "html_ref.sed"
j=$(($j+1))
done