chiark / gitweb /
cards-oxymoron: Build arrangements
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Mar 2021 15:20:54 +0000 (15:20 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Mar 2021 20:49:09 +0000 (20:49 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README.md
library/cards-oxymoron/.gitignore [new file with mode: 0644]
library/cards-oxymoron/build [new file with mode: 0755]

index 4d8e1b1b93a5f057be80a34e3d95359d68c3c394..82e917f76a2eefd7a0465b630a432d3e48d87f0e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -125,7 +125,8 @@ Setup
 ```
      sudo apt install build-essential cpio git curl     \
                       pkg-config libssl-dev             \
-                      node-typescript inkscape bubblewrap
+                      node-typescript inkscape bubblewrap \
+                      netpbm
 ```
 
 2. Install Rust.  This is most easily done with [rustup](https://rustup.rs)):
diff --git a/library/cards-oxymoron/.gitignore b/library/cards-oxymoron/.gitignore
new file mode 100644 (file)
index 0000000..8c2b7dd
--- /dev/null
@@ -0,0 +1,2 @@
+cards/src/*.gif
+cards/src/make-cards.massaged
diff --git a/library/cards-oxymoron/build b/library/cards-oxymoron/build
new file mode 100755 (executable)
index 0000000..b8b988a
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+cd library/cards-oxymoron/cards/src
+
+perl -pe <make-cards >make-cards.massaged '
+       s{^#! */usr/bin/perl}{$& -w};
+       print "sub xsystem { \$?=0; \$!=0; system \@_ and die \"$! $?\"; }\n"
+               if !m/\S/ && !$done++;
+       s{\bsystem\(}{x$&}g;
+'
+chmod +x ./make-cards.massaged
+./make-cards.massaged