Skip to content

Commit

Permalink
feat: use sed differently on macOS than on other systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandmalfarbe committed Jan 10, 2025
1 parent 43b4aeb commit 66d03ca
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ fi
cp "template-multi-file/eisvogel.latex" "${distFolderName}/eisvogel.latex"

# replace partials (latex)
sed $SEDOPTION -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed $SEDOPTION -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.latex"
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"

# create single template file for beamer
cp "template-multi-file/eisvogel.beamer" "${distFolderName}/eisvogel.beamer"

# replace partials (beamer)
sed $SEDOPTION -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed $SEDOPTION -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
# The beamer template has no eisvogel block $eisvogel-added.latex()$
# The beamer template has no eisvogel titlepage $eisvogel-titlepage.latex()$
sed $SEDOPTION -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed $SEDOPTION -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed $SEDOPTION -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' "${distFolderName}/eisvogel.beamer"
sed -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"


# create folder for the release eisvogel (ZIP and tar.gz)
Expand Down

0 comments on commit 66d03ca

Please sign in to comment.