save
This commit is contained in:
parent
e42c263a8f
commit
71ae5733ae
1 changed files with 5 additions and 5 deletions
10
init.sh
10
init.sh
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash
|
||||
{
|
||||
source config
|
||||
find -type f | xargs sed -i "s/\$mainfile/${mainfile}/g"
|
||||
find -type f | xargs sed -i "s/\$course/${course}/g"
|
||||
find -type f | xargs sed -i "s/\$stylefile/${stylefile}/g"
|
||||
find -type f | xargs sed -i "s/\$repo/${repo}/g"
|
||||
find -type f | xargs sed -i "s/\$term/${term}/g"
|
||||
find -type f | xargs sed -i "s/\$mainfile/$(printf '%s\n' "$mainfile" | sed -e 's/[\/&]/\\&/g')/g"
|
||||
find -type f | xargs sed -i "s/\$course/$(printf '%s\n' "$course" | sed -e 's/[\/&]/\\&/g')/g"
|
||||
find -type f | xargs sed -i "s/\$stylefile/$(printf '%s\n' "$stylefile" | sed -e 's/[\/&]/\\&/g')/g"
|
||||
find -type f | xargs sed -i "s/\$repo/$(printf '%s\n' "$repo" | sed -e 's/[\/&]/\\&/g')/g"
|
||||
find -type f | xargs sed -i "s/\$term/$(printf '%s\n' "$term" | sed -e 's/[\/&]/\\&/g')/g"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue