Guest User

Untitled

a guest
Nov 18th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. VERSION="4.1"
  4. OUT="$1"
  5.  
  6. #if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
  7. if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null` && [$VERSION != "4.1"]; then
  8. git update-index --refresh --unmerged > /dev/null
  9. descr=$(git describe --match=v*)
  10.  
  11. # on git builds check that the version number above
  12. # is correct...
  13. [ "${descr%%-*}" = "v$VERSION" ] || exit 2
  14.  
  15. v="${descr#v}"
  16. if git diff-index --name-only HEAD | read dummy ; then
  17. v="$v"-dirty
  18. fi
  19. else
  20. v="$VERSION"
  21. fi
  22.  
  23. echo '#include "iw.h"' > "$OUT"
  24. echo "const char iw_version[] = \"$v\";" >> "$OUT"
Add Comment
Please, Sign In to add comment