-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from siefkenj/ci
Derive Pretext Sources
- Loading branch information
Showing
8 changed files
with
1,298 additions
and
3 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
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,41 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Define the repository details | ||
REPO_OWNER="siefkenj" | ||
REPO_NAME="IBLLinearAlgebra-pretext" | ||
BRANCH_NAME="main" | ||
|
||
# Create the directory and navigate into it | ||
rm -rf book-pretext | ||
mkdir -p book-pretext | ||
cd book-pretext | ||
|
||
# Download the repository zip | ||
URL="https://github.com/$REPO_OWNER/$REPO_NAME/archive/refs/heads/$BRANCH_NAME.zip" | ||
echo "Starting download of $URL" | ||
curl -sS -LJO "$URL" | ||
echo "Download complete." | ||
|
||
# Extract the zip file | ||
unzip -q $REPO_NAME-$BRANCH_NAME.zip | ||
|
||
# Navigate into the extracted directory | ||
cd $REPO_NAME-$BRANCH_NAME | ||
|
||
# Run npm ci | ||
npm ci | ||
|
||
# Convert the textbook | ||
npx vite-node src/convert-textbook.ts -i ../../../book/linearalgebra.tex | ||
|
||
# File is now written to tmp.out.ptx | ||
mkdir -p pretext-output/source | ||
|
||
echo "Moving tmp.out.ptx to pretext-output/source/main.ptx" | ||
mv tmp.out.ptx pretext-output/source/main.ptx | ||
|
||
# Move the output to the root level | ||
echo "Moving source files to book-pretext/pretext-output/" | ||
mv pretext-output/ .. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.