9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-04 12:33:38 +01:00
qp2/ocaml/create_git_sha1.sh

12 lines
296 B
Bash
Raw Normal View History

2019-01-25 11:39:31 +01:00
#!/bin/bash
SHA1=$(git log -1 | head -1 | cut -d ' ' -f 2)
DATE=$(git log -1 | grep Date | cut -d ':' -f 2-)
MESSAGE=$(git log -1 | tail -1 | sed 's/"/\\"/g')
cat << EOF > Git.ml
2019-03-13 13:02:29 +01:00
let sha1 = "$SHA1" |> String.trim
let date = "$DATE" |> String.trim
let message = "$MESSAGE" |> String.trim
2019-01-25 11:39:31 +01:00
EOF