Created
May 8, 2018 16:53
-
-
Save leingang/f00b246c3faeb503e76e41d6d789235c to your computer and use it in GitHub Desktop.
Roll back AMC to 1.2 with macports
This file contains hidden or 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
#!/bin/bash | |
# Install version 1.2.8 of auto-multiple-choice, with some patches | |
# (C) 2018 Akim Demaille and Matthew Leingang | |
# | |
# See https://project.auto-multiple-choice.net/boards/2/topics/6301 | |
# | |
# UNTESTED | |
cd /tmp | |
git clone --single-branch https://github.com/macports/macports-ports.git | |
cd macports-ports | |
git co a82a684b671a52c83fe6608c4f530ddf82fe8e5f | |
cd x11/auto-multiple-choice | |
port deactivate auto-multiple-choice | |
port -n install # -n to avoid updating opencv, which fails today | |
perl -pi -e "s{use encoding .utf-?8.;}{use utf8;}" /opt/local/lib/AMC/perl/*.pl | |
cat <<EOT >> AMC-meptex.pl.patch | |
119c119 | |
< if(/\\page{([^\}]+)}{([^\}]+)}{([^\}]+)}/) { | |
--- | |
> if(/\\page\{([^\}]+)}\{([^\}]+)}\{([^\}]+)}/) { | |
EOT | |
patch /opt/local/lib/AMC/perl/AMC-meptex.pl < AMC-meptex.pl.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment