about summary refs log tree commit diff
path: root/gen-version.sh
blob: 3a080157cf4e871d8e4f63d01855d8eeaf36f943 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

# Get version-info specified in Makefile
V=$1

# Use `git describe` to get current version if we're inside a git repo
if test -d .git
then
	V=$(git describe --abbrev=4 HEAD 2>/dev/null)
fi

new="CGIT_VERSION = $V"
old=$(cat VERSION 2>/dev/null)

# Exit if VERSION is uptodate
test "$old" = "$new" && exit 0

# Update VERSION with new version-info
echo "$new" > VERSION
cat VERSION
ode from link scriptJune McEnroe 2017-09-06Move C code to bin, Makefile, AGPLJune McEnroe 2017-09-06Rename curtis -> homeJune McEnroe 2017-09-05Pass final NULL to execlpJune McEnroe 2017-09-05Add watch.cJune McEnroe 2017-09-02Remove Scala highlightingJune McEnroe 2017-08-31Fix Linux console Tarmak 3June McEnroe 2017-08-31Use Tarmak 3 on Linux consoleJune McEnroe 2017-08-25Install ddateJune McEnroe 2017-08-19Move nethack options to envJune McEnroe 2017-08-17Remove scala syntax fileJune McEnroe 2017-08-06Add wakeJune McEnroe 2017-08-04Use $() in install.shJune McEnroe 2017-08-02Create Code Tarmak 3 layoutJune McEnroe 2017-07-31Add tupJune McEnroe 2017-07-31Use designated initializer for hnel tableJune McEnroe 2017-07-30Add juneJune McEnroe 2017-07-30Play nethack as ValkyrieJune McEnroe 2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe