move actual template into subfolder
This commit is contained in:
parent
7c399ab03f
commit
04583c78ce
14 changed files with 26 additions and 19 deletions
11
README.md
11
README.md
|
@ -1,11 +0,0 @@
|
|||
# $course
|
||||
|
||||
These are the lecture notes for the '$course', taught in $term at the University of Bonn.
|
||||
|
||||
The [latest version][1] is availabe as a pdf download via GitLab runner.
|
||||
You can also have a look at the generated [log files][2] or visit the
|
||||
[gl pages][3] index directly.
|
||||
|
||||
[1]: $repo/$mainfile.pdf
|
||||
[2]: $repo/$mainfile.log
|
||||
[3]: $repo/
|
23
init.sh
23
init.sh
|
@ -1,31 +1,38 @@
|
|||
#!/bin/bash
|
||||
# safety first
|
||||
if [[ $(pwd) == *template* ]]
|
||||
then
|
||||
echo "Don't run this in the template directory!"
|
||||
echo "Rename the current folder or edit init.sh to do this anyways"
|
||||
exit
|
||||
fi
|
||||
|
||||
{ ## DO NOT REMOVE THIS OR EVERYTHING BLOWS UP
|
||||
cat config
|
||||
source config
|
||||
cd template
|
||||
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"
|
||||
cd ..
|
||||
|
||||
# clean up meta files
|
||||
rm init.sh
|
||||
rm config
|
||||
rm README.md
|
||||
rm -rf .git
|
||||
|
||||
# move template files into this directory
|
||||
mv "template/"* .
|
||||
mv mainfile.tex $mainfile.tex
|
||||
mv stylefile.sty $stylefile.sty
|
||||
mv gitlab-ci.yml .gitlab-ci.yml
|
||||
mv gitignore .gitignore
|
||||
mv latexmkrc .latexmkrc
|
||||
mv ci .ci
|
||||
rm init.sh
|
||||
rm -rf .git
|
||||
rm config
|
||||
|
||||
# init new repo
|
||||
git init
|
||||
git submodule add https://gitlab.com/latexci/packages/LatexPackagesBuild.git
|
||||
git submodule foreach git checkout master-build
|
||||
mv gitmodules .gitmodules
|
||||
git add .
|
||||
git commit -m "initial commit"
|
||||
}
|
||||
|
|
0
gitignore → template/.gitignore
vendored
0
gitignore → template/.gitignore
vendored
0
gitmodules → template/.gitmodules
vendored
0
gitmodules → template/.gitmodules
vendored
11
template/README.md
Normal file
11
template/README.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# $course
|
||||
|
||||
These are the lecture notes for the '$course', taught in $term at the University of Bonn.
|
||||
|
||||
The [latest version][1] is availabe as a pdf download via GitLab runner.
|
||||
You can also have a look at the generated [log files][2] or visit the
|
||||
[gl pages][3] index directly.
|
||||
|
||||
[1]: $repo/$mainfile.pdf
|
||||
[2]: $repo/$mainfile.log
|
||||
[3]: $repo/
|
Loading…
Reference in a new issue