Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  4. cd $DIR
  5. echo Updating $DIR/git_info.h
  6.  
  7. GIT_BRANCH=`git -C $DIR rev-parse --abbrev-ref HEAD`
  8. GIT_REVISION=`git -C $DIR rev-parse --short HEAD`
  9.  
  10. [ -z "$GIT_BRANCH" ] && GIT_BRANCH="Unknown";
  11. [ -z "$GIT_REVISION" ] && GIT_REVISION="Unknown";
  12.  
  13. echo // This is an auto generated file > $DIR/git_info.h
  14. echo const QString GIT_BRANCH=\"$GIT_BRANCH\"\; >> $DIR/git_info.h
  15. echo const QString GIT_REVISION=\"$GIT_REVISION\"\; >> $DIR/git_info.h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement