Skip to content

Commit

Permalink
Docker: install Relearn via Git (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagix authored Aug 28, 2023
1 parent eb106cb commit 0ac7686
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docker/install-pandoc-lecture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@

## Pandoc-Lecture: https://github.com/cagix/pandoc-lecture.git
git clone --depth 1 https://github.com/cagix/pandoc-lecture.git ${XDG_DATA_HOME}/pandoc/

# remove .git/ folder after cloning
rm -rf ${XDG_DATA_HOME}/pandoc/.git/
13 changes: 9 additions & 4 deletions docker/install-relearn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ export RELEARN="5.20.0"
# set XDG_DATA_HOME externally

## Hugo Relearn Theme: https://github.com/McShelby/hugo-theme-relearn/releases/latest/
wget https://github.com/McShelby/hugo-theme-relearn/archive/refs/tags/${RELEARN}.tar.gz
# stopped working, see #157
#wget https://github.com/McShelby/hugo-theme-relearn/archive/refs/tags/${RELEARN}.tar.gz

if [ ! -d ${XDG_DATA_HOME}/pandoc/hugo/ ]; then
if [ ! -d ${XDG_DATA_HOME}/pandoc/hugo/hugo-theme-relearn/ ]; then
echo "checkout github.com/cagix/pandoc-lecture to ${XDG_DATA_HOME}/pandoc/ first! bailing out."
exit 1
else
tar -zxf ${RELEARN}.tar.gz --strip-components 1 -C ${XDG_DATA_HOME}/pandoc/hugo/hugo-theme-relearn/
rm ${RELEARN}.tar.gz
# remove placeholder directory
rm -rf ${XDG_DATA_HOME}/pandoc/hugo/hugo-theme-relearn/
# clone theme
git clone --depth 1 --branch ${RELEARN} https://github.com/McShelby/hugo-theme-relearn.git ${XDG_DATA_HOME}/pandoc/hugo/hugo-theme-relearn/
# remove .git/ folder after cloning
rm -rf ${XDG_DATA_HOME}/pandoc/hugo/hugo-theme-relearn/.git/
fi

0 comments on commit 0ac7686

Please sign in to comment.