-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4617908
commit 11c97b6
Showing
6 changed files
with
135 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Generate a zip file suitable for uploading to CTAN. | ||
# | ||
# This script relies on the TDS directory having been made. | ||
# | ||
|
||
REMOVE_OUT=false | ||
EXCLUDE_TDS=false | ||
|
||
while getopts 'abf:v' flag; do | ||
case "${flag}" in | ||
RemoveOut) REMOVE_OUT=true ;; | ||
ExcludeTds) EXCLUDE_TDS=true ;; | ||
*) break ;; | ||
esac | ||
done | ||
|
||
in="tdsout" | ||
out="ctanout" | ||
|
||
# We need the following files in the zip for ctan: | ||
# - The class files | ||
# - The style files | ||
# - The docs (including the pdf versions) | ||
# - The logos | ||
# - The readme | ||
|
||
# First, create the output directory | ||
mkdir -p "$out/ugent2016" | ||
|
||
find ${in} -type f -exec cp "{}" "$out/ugent2016" ";" | ||
|
||
# Add tds-compliant zip file if necessary | ||
if [[ ${EXCLUDE_TDS} = false ]]; then | ||
cp ugent2016.tds.zip ${out} | ||
fi | ||
|
||
cd ${out} | ||
zip --filesync -r ../ugent2016.zip * | ||
|
||
if [[ "$REMOVE_OUT" = true ]]; then | ||
rm -rf ${out} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Generate a TDS compliant zip | ||
# | ||
|
||
REMOVE_OUT=false | ||
|
||
while getopts 'abf:v' flag; do | ||
case "${flag}" in | ||
RemoveOut) REMOVE_OUT=true ;; | ||
*) break ;; | ||
esac | ||
done | ||
|
||
out="tdsout" | ||
in="latex" | ||
|
||
|
||
latex="$out/tex/latex/ugent2016" | ||
doc="$out/doc/latex/ugent2016" | ||
source="$out/source/latex/ugent2016" | ||
|
||
mkdir -p ${latex} | ||
mkdir -p ${doc} | ||
mkdir -p ${source} | ||
|
||
# Copy all latex files | ||
find ${in} -name '*.cls' -o -name '*.sty' -exec cp "{}" ${latex} ";" | ||
|
||
# Copy all doc files | ||
find ${in} -name '*.md' -exec cp "{}" ${doc} ";" | ||
|
||
# Copy all source files | ||
find ${in} -name '*.tex' -exec cp "{}" ${source} ";" | ||
|
||
# Convert all line endings | ||
find ${out} -type f -print0 | xargs -0 dos2unix | ||
|
||
# Copy logos | ||
find ${in} -name 'ugent2016-logo-*.pdf' -exec cp "{}" ${latex} ";" | ||
|
||
# Copy the documentation pdfs to the folder | ||
cp "$in/ugent2016-nl.pdf" ${doc} | ||
cp "$in/ugent2016-en.pdf" ${doc} | ||
|
||
# Fix all permissions | ||
find ${out} -type f -exec chmod 644 "{}" ";" | ||
|
||
cd ${out} | ||
zip --filesync -r ../ugent2016.tds.zip * | ||
|
||
chmod 644 ../ugent2016.tds.zip | ||
|
||
if [[ "$REMOVE_OUT" = true ]]; then | ||
rm -rf ${out} | ||
fi |
File renamed without changes.