Remove old icon's XCF and add new icon's SVG
[skype-call-recorder.git] / makeversion
blob074bf4ba949bc05a869e8c316d23960d01d4d900
1 #!/bin/sh
3 # this script creates version.cpp containing version and other compile-time
4 # information. it expects to get the source directory as only argument.
6 output=version.cpp
8 src=$1
9 test "$src" = '' && src=.
11 date=`date --utc +%Y-%m-%d`
12 if test -e "$src/.git"; then
13 commit=`( cd "$src"; git rev-parse HEAD 2> /dev/null; )`
14 version=`( cd "$src"; git describe --tags HEAD 2> /dev/null; ) || echo "$commit"`
15 if test "$commit" != ''; then
16 ( cd "$src"; git diff --quiet HEAD; ) || { commit="$commit (dirty)"; version="$version (dirty)"; }
19 test -z "$commit" -a -e "$src/gitcommit" && commit=`< "$src/gitcommit"`
20 test -z "$version" -a -e "$src/version" && version=`< "$src/version"`
21 test -z "$commit" && commit=unknown
22 test -z "$version" && version=unknown
23 cat > "$output-new" <<EOF
24 #include "common.h"
25 const char *recorderCommit = "$commit";
26 const char *recorderDate = "$date";
27 const char *recorderVersion = "$version";
28 EOF
30 if test -e "$output" && diff -q "$output" "$output-new" > /dev/null 2>&1; then
31 rm "$output-new"
32 else
33 mv "$output-new" "$output"