From dfe47d067a70f9781e3b431f6a685090bf87ff40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 5 May 2015 11:58:26 +0200 Subject: Add picosat version 959 --- scripts/picosat-959/mkconfig | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 scripts/picosat-959/mkconfig (limited to 'scripts/picosat-959/mkconfig') diff --git a/scripts/picosat-959/mkconfig b/scripts/picosat-959/mkconfig new file mode 100755 index 0000000..d0c8fa8 --- /dev/null +++ b/scripts/picosat-959/mkconfig @@ -0,0 +1,35 @@ +#!/bin/sh + +die () { + echo "*** mkconfig: $*" 1>&2 + exit 1 +} + +[ -f makefile ] || die "can not find 'makefile'" + +sed \ + -e '/^C[A-Z]*=/!d' \ + -e 's,^,#define PICOSAT_,' \ + -e 's,= *, ",' \ + -e 's,$,",' \ + makefile + +id="" +if [ -d .git -a -f .git/HEAD ] +then + head="`awk 'NF == 1' .git/HEAD`" + if [ x"$head" = x ] + then + head="`awk '{print $2}' .git/HEAD`" + if [ ! x"$head" = x -a -f ".git/$head" ] + then + id=" `cat .git/$head`" + fi + else + id=" $head" + fi +fi + +echo "#define PICOSAT_VERSION \"`cat VERSION`$id\"" + +exit 0 -- cgit v1.2.3