3 # maybe-rerun-optim - helper for build system for board layouts
5 # Copyright (C) 2019 Ian Jackson
7 # This program is dual licensed, GPv3+ or CC-BY-SA 4.0+.
8 # Only to the Pandemic Rising Tide folks, it is permissively licensed.
10 # This program is free software.
12 # You can redistribute it and/or modify it under the terms of the
13 # GNU General Public License as published by the Free Software
14 # Foundation, either version 3 of the License, or (at your option)
15 # any later version; or (at your option), under the terms of the
16 # Creative Commons Attribution-ShareAlike International License,
17 # version 4.0 of that License, or (at your option), any later
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 # General Public License Creative Commons Attribution-ShareAlike
24 # License or the for more details.
26 # You should have received a copy of these licenses along with this
27 # program. If not, see <https://www.gnu.org/licenses/> and
28 # <https://creativecommons.org/licenses/>.
30 # Pandemic and Pandemic Rising Tide are (I think) trademarks of Z-Man
31 # games and I use them without permission.
33 # For the avoidance of doubt, I do not consider this program to be a
34 # derivative work of the game Pandemic Rising Tide. However, it is
35 # not very useful without a pair of game description files and the
36 # only nontrivial game description files I know of are indeed such
45 planar_graph=$1 ; shift
49 inst () { mv -vf $dest.tmp $dest; }
51 if test -f $dest.reuse; then
52 cp -v $dest.reuse $dest.tmp
57 sha256sum "$input" "$planar_graph" >$sums.tmp
58 for arg in "$@"; do printf >>$sums.tmp "%s\n" "$arg"; done
60 if cmp $sums.tmp $sums; then
64 "$planar_graph" <$input "$@"