Debian Codegraph @

scripts/snapstamp

raw symbols SCIP
1 #!/bin/sh
2
3 # Emit a snapshot identifier if STP_BUILD_SNAPSHOT is set
4 # Note that this is needed prior to autogen.sh so needs a fixed
5 # shebang line.
6 #
7 # Copyright (C) 2019 Robert Krawitz
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <https://www.gnu.org/licenses/>.
21
22 [ -n "$STP_BUILD_SNAPSHOT" ] && [ -d .git ] && printf '%s%(%Y-%m-%dT%H-%M)T-%s' - -1 "$(git describe --dirty --always --first-parent --exclude '*')"