-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
10 changed files
with
298 additions
and
39 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,12 @@ | ||
; DO NOT EDIT (unless you know what you are doing) | ||
; | ||
; This subdirectory is a git "subrepo", and this file is maintained by the | ||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme | ||
; | ||
[subrepo] | ||
remote = https://github.com/cdlm/sbabook.git | ||
branch = master | ||
commit = 6ba943f40408c19528b5c62d5c498c9507e44335 | ||
parent = d9663feb3a92f12b7cc6268e6cc41a5d6aef60da | ||
method = merge | ||
cmdver = 0.4.1 |
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,18 +1,27 @@ | ||
sudo: required | ||
services: | ||
- docker | ||
version: "~> 1.0" | ||
env: | ||
global: | ||
- PATH=$HOME/texlive/bin/x86_64-linux:$PATH | ||
jobs: | ||
- TEXLIVE_RELEASE=rolling | ||
- TEXLIVE_RELEASE=2018 | ||
|
||
before_install: | ||
- docker pull dpollet/texlive:base | ||
install: | ||
- ./ci/install-texlive | ||
|
||
script: | ||
- docker run --tty --rm --volume $PWD:/work dpollet/texlive:base latexmk | ||
- latexmk | ||
|
||
after_failure: | ||
- cat sbabook.log | ||
|
||
deploy: | ||
- provider: releases | ||
api_key: | ||
secure: 0VV/C2lRToLm/PzZd4tVWOGGVjgRi11nj4VRw/D93Y1XTy2IWoyctWg/02OpZ+vzmMjT9dk/V2ZyfsYZT/dTSVT2HVPW8n4HSlBDqHhVaEGEKEd2YxLw/V1yVehco16gAtaDAFCZITW2Kod9hiIRoRTcInkCyT4zKrco6v7XmSY= | ||
skip_cleanup: true | ||
file: sbabook.pdf | ||
on: | ||
tags: true | ||
- provider: releases | ||
edge: true | ||
api_key: | ||
secure: tOQFCGi5LjrbGVGh22mQmLZvo6aAjw17pj6Hd2mpcgaMGwjNG7gBbvODFfuyCZMorVBwTu5YBk2QSXY9lk0xhmSfZ5XdPAh6foC/vP+y8XZzZV/YsrFR0yltGp6CFL7QtxoTiK3h7VmlD2gM8pgThG3N68Dy/tKxuSEednOOjBI= | ||
file: sbabook.pdf | ||
on: | ||
repo: cdlm/sbabook | ||
tags: true | ||
condition: $TEXLIVE_RELEASE = rolling |
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,111 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR | ||
IFS=$'\n\t' | ||
# preamble from https://disconnected.systems/blog/another-bash-strict-mode/ | ||
|
||
function die() { | ||
echo "$@" >&2 | ||
exit 1 | ||
} | ||
|
||
function texlive-repo() { | ||
[[ $# -eq 1 ]] || die "${FUNCNAME[0]}: No release specified (YYYY or rolling)" | ||
local release="$1" | ||
|
||
if [[ "$release" = rolling ]]; then | ||
echo 'http://mirror.ctan.org/systems/texlive/tlnet' | ||
else | ||
[[ "$release" = [0-9][0-9][0-9][0-9] ]] || die "${FUNCNAME[0]}: incorrect release '$release'" | ||
echo "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${release}/tlnet-final/" | ||
# the rolling release is missing the shasum, and the tlnet directory | ||
# US mirror: http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${release}/ | ||
fi | ||
} | ||
|
||
function deps-file() { | ||
if [[ "$1" = [0-9][0-9][0-9][0-9] ]]; then | ||
echo "texlive-$1.deps" | ||
else | ||
echo texlive.deps | ||
fi | ||
} | ||
|
||
function texlive-release() { | ||
tlmgr --version \ | ||
| grep 'TeX Live .*version' \ | ||
| grep --only-matching '\d\d\d\d' | ||
} | ||
|
||
# Ensure meaningful default values for required environment variables. | ||
# Override the full repository URL or set TEXLIVE_RELEASE to pick that year's frozen release. | ||
# Defaults to the current rolling release. | ||
: "${TEXLIVE_RELEASE:=rolling}" | ||
: "${TEXLIVE_REPOSITORY:="$(texlive-repo "$TEXLIVE_RELEASE")"}" | ||
: "${TEXLIVE_TARBALL:=install-tl-unx.tar.gz}" | ||
|
||
function get-texlive-installer() { | ||
# download, checksum, extract | ||
curl --silent --location --remote-name-all "${TEXLIVE_REPOSITORY}/${TEXLIVE_TARBALL}"{,.sha512} | ||
shasum --check "${TEXLIVE_TARBALL}.sha512" | ||
tar --extract --gzip --file "${TEXLIVE_TARBALL}" | ||
} | ||
|
||
function texlive-profile() { | ||
cat <<EOF | ||
selected_scheme scheme-basic | ||
TEXDIR $HOME/texlive | ||
TEXMFLOCAL \$TEXDIR/texmf-local | ||
TEXMFSYSCONFIG \$TEXDIR/texmf-config | ||
TEXMFSYSVAR \$TEXDIR/texmf-var | ||
TEXMFCONFIG \$TEXMFSYSCONFIG | ||
TEXMFHOME \$TEXMFLOCAL | ||
TEXMFVAR \$TEXMFSYSVAR | ||
instopt_adjustpath 0 | ||
instopt_adjustrepo 0 | ||
instopt_letter 0 | ||
instopt_portable 0 | ||
instopt_write18_restricted 1 | ||
# set repository: | ||
tlpdbopt_autobackup 0 | ||
tlpdbopt_create_formats 1 | ||
tlpdbopt_generate_updmap 0 | ||
tlpdbopt_install_docfiles 0 | ||
tlpdbopt_install_srcfiles 0 | ||
tlpdbopt_post_code 1 | ||
EOF | ||
} | ||
|
||
function install-texlive() { | ||
[[ $TRAVIS = true ]] || die "Should only run on Travis" | ||
echo "Downloading minimal TeXlive..." | ||
echo " release $TEXLIVE_RELEASE" | ||
echo " from $TEXLIVE_REPOSITORY" | ||
|
||
get-texlive-installer | ||
|
||
# find installer path from archive listing, sanity check | ||
local installer | ||
installer="$(tar --list --gzip --file "${TEXLIVE_TARBALL}" | grep '/install-tl$' )" | ||
[[ -x "$installer" ]] || die "can not find TeXlive installer at ${installer}"; | ||
|
||
texlive-profile >> texlive.profile | ||
"$installer" --repository "$TEXLIVE_REPOSITORY" --profile texlive.profile | ||
} | ||
|
||
function install-deps() { | ||
xargs tlmgr install \ | ||
latexmk \ | ||
< "$(deps-file "$TEXLIVE_RELEASE")" | ||
} | ||
|
||
# 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 | ||
install-texlive | ||
install-deps | ||
fi |
Empty file.
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
Oops, something went wrong.