-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git subrepo pull --update --branch=main --force _support/latex/sbabook
subrepo: subdir: "_support/latex/sbabook" merged: "d7cdd1c" upstream: origin: "https://github.com/cdlm/sbabook.git" branch: "main" commit: "d7cdd1c" git-subrepo: version: "0.4.6" origin: "https://github.com/Homebrew/brew" commit: "f5cde8ad0d"
- Loading branch information
Showing
12 changed files
with
296 additions
and
70 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
kind: pipeline | ||
type: docker | ||
name: TeXlive | ||
|
||
steps: | ||
- name: build | ||
image: texlive/texlive | ||
commands: | ||
- tlmgr option repository https://ctan.gutenberg-asso.fr/systems/texlive/tlnet | ||
- tlmgr update --self --all | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: minimal TeXlive | ||
|
||
steps: | ||
- name: build | ||
image: texlive/texlive:latest-minimal | ||
pull: always | ||
commands: | ||
- tlmgr option repository https://ctan.gutenberg-asso.fr/systems/texlive/tlnet | ||
- tlmgr update --self --all | ||
- tlmgr install latex-bin latexmk | ||
- xargs tlmgr install < texlive.deps | ||
- tlmgr path add | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: Ubuntu + TeXlive 2023 | ||
|
||
environment: | ||
TEXLIVE_RELEASE: 2023 | ||
|
||
steps: | ||
- name: build | ||
image: ubuntu | ||
commands: | ||
- apt update && apt install -y curl perl | ||
- echo $PATH | ||
- export PATH=$HOME/texlive/bin/x86_64-linux:$HOME/texlive/bin/aarch64-linux:$PATH | ||
- ./ci/install-texlive | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] | ||
|
||
--- | ||
kind: pipeline | ||
type: docker | ||
name: Ubuntu + TeXlive rolling | ||
|
||
environment: | ||
TEXLIVE_RELEASE: rolling | ||
|
||
steps: | ||
- name: build | ||
image: ubuntu | ||
commands: | ||
- apt update && apt install -y curl perl | ||
- echo $PATH | ||
- export PATH=$HOME/texlive/bin/x86_64-linux:$HOME/texlive/bin/aarch64-linux:$PATH | ||
- ./ci/install-texlive | ||
- latexmk sbabook | ||
- latexmk sbabook.bod | ||
- latexmk sbabook.spiral | ||
|
||
- name: build log | ||
image: alpine | ||
commands: | ||
- cat sbabook.log | ||
- cat sbabook.bod.log | ||
- cat sbabook.spiral.log | ||
when: | ||
status: [failure, success] |
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
Binary file not shown.
Binary file not shown.
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,91 @@ | ||
#!/usr/bin/env bash | ||
set -o nounset | ||
set -o errexit | ||
set -o errtrace | ||
set -o pipefail | ||
IFS= | ||
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR | ||
|
||
shopt -s extglob | ||
declare -A DEPS | ||
|
||
PREFIX="$(kpsewhich --var-value TEXMFROOT)" | ||
|
||
function die { | ||
local code="${1:-1}" | ||
[[ $# -ge 1 ]] && shift | ||
|
||
printf "$(tput setaf 1)%s$(tput sgr0)\n" "$@" 1>&2 | ||
exit "$code" | ||
} | ||
|
||
function info-inline { | ||
printf "$(tput setaf 3)%s$(tput sgr0)" "$@" 1>&2 | ||
} | ||
|
||
function info { | ||
info-inline "$@" | ||
printf "\n" 1>&2 | ||
} | ||
|
||
function filter-inputs { | ||
sed -e '\#^INPUT '"$PREFIX"'/texmf-dist#!d' \ | ||
-e 's#^INPUT '"$PREFIX"'/##' \ | ||
"$@" | ||
} | ||
|
||
function query-package-containing { | ||
local filename="${1?}" | ||
tlmgr search --global --file "$filename" \ | ||
| sed '/^\t/d ; /^tlmgr:/d ; s/:$//' | ||
} | ||
|
||
function list-package-files { | ||
local pkgname="${1?}" | ||
tlmgr info --list "$pkgname" \ | ||
| sed '/^ /!d ; s/^ *//' | ||
} | ||
|
||
function encache-file { | ||
local filename="${1?}" pkgname | ||
pkgname="$(query-package-containing "${filename}")" | ||
while read -r provided; do | ||
DEPS["$provided"]="$pkgname" | ||
done < <(list-package-files "$pkgname") | ||
} | ||
|
||
function package-name { | ||
local filename="${1?}" | ||
info-inline "$filename" | ||
if [[ -z "${DEPS["$filename"]+found}" ]]; then | ||
info " (querying…)" | ||
encache-file "$filename" | ||
echo "${DEPS["$filename"]}" | ||
else | ||
info " (from ${DEPS[$filename]})" | ||
fi | ||
} | ||
|
||
function find-packages { | ||
while read -r filename; do | ||
package-name "$filename" | ||
done | ||
} | ||
|
||
function list-deps { | ||
local main="${1:-main}" | ||
main="${main%.@(tex|aux|fls)}" # extglob | ||
[[ -f "$main.fls" ]] || die 1 "no such file: $main.fls" | ||
|
||
filter-inputs "$main.fls" | sort --unique > "$main.inputs" | ||
info "$(wc -l "$main.inputs")" | ||
|
||
find-packages < "$main.inputs" | tee "$main.deps" | ||
sort --unique --output "$main.deps" "$main.deps" | ||
} | ||
|
||
# Only call the main function if this script was called as a command. This makes | ||
# it possible to source this script as a library. | ||
if [[ ${BASH_SOURCE[0]} == "$0" ]]; then | ||
list-deps "$@" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
% Paper format for https://librairie.bod.fr | ||
\newcommand{\bodpage}{ | ||
\setstocksize{220mm}{155mm} % final trimmed book dimensions | ||
\setbleed{5mm} % additional paper, before trimming | ||
\setlrmarginsandblock{.85in}{.65in}{*} | ||
\setulmarginsandblock{.75in}{.75in}{*}} | ||
\providecommand{\setuppage}{\bodpage}\input{sbabook} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
% Paper format for office binding (A4 or letter paper) | ||
\providecommand{\setuppage}{\spiralboundpage}\input{sbabook} |
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
Oops, something went wrong.