Skip to content

Commit

Permalink
Move helpers to sys
Browse files Browse the repository at this point in the history
  • Loading branch information
prodrigestivill committed Aug 8, 2024
1 parent 447a9ab commit 3566ba3
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Linting
run: sys/lint.sh
- name: Install dependencies
run: |
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install pandoc texlive-xetex texinfo
go install github.com/n0x1m/md2gmi@latest
- name: Linting
run: sh lint.sh
- name: Build ebooks
run: make pdf epub info gmi one
- name: Upload artifacts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ _book/*
*.bak
*.log
gmi/
r2book.md
r2book.pdf
r2book.epub
r2book.texi
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all: pdf epub

.PHONY: epub pdf gmi texi info
.PHONY: epub pdf gmi texi info one

# CHAPTERS=$(shell find src -iname *.md)
CHAPTERS=$(shell grep -Eoi '\([^\)]+' src/SUMMARY.md | sed -e 's,^.,src/,')
Expand All @@ -25,14 +25,14 @@ epub:
texi:
pandoc $(CHAPTERS) $(PANDOC_OPTIONS) -o r2book.texi

one r2book.md:
sh one.sh > r2book.md

info: texi
rm -f r2book.info r2book.info.gz
makeinfo --force --no-split r2book.texi
gzip -9n r2book.info

one r2book.md:
sys/one.sh > r2book.md

GOPATH?=$(HOME)/go
GOBIN?=$(GOPATH)/bin
MD2GMI?=$(GOBIN)/md2gmi
Expand Down
2 changes: 0 additions & 2 deletions one.sh

This file was deleted.

2 changes: 2 additions & 0 deletions lint.sh → sys/lint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

cd $(dirname "$0")/..

posix_pushd() {
if [ $# -eq 0 ]; then
echo "Usage: pushd <directory>"
Expand Down
5 changes: 5 additions & 0 deletions sys/one.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

cd $(dirname "$0")/..

cat `sys/lint.sh`

0 comments on commit 3566ba3

Please sign in to comment.