patch-version_sh 748 B

1234567891011121314151617181920212223242526272829
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iw-0.9.14.orig/version.sh 2009-05-13 00:10:08.000000000 +0200
  3. +++ iw-0.9.14/version.sh 2009-05-21 23:14:24.000000000 +0200
  4. @@ -1,23 +1,7 @@
  5. -#!/bin/sh
  6. +#!/usr/bin/env bash
  7. VERSION="0.9.14"
  8. OUT="$1"
  9. -
  10. -if head=`git rev-parse --verify HEAD 2>/dev/null`; then
  11. - git update-index --refresh --unmerged > /dev/null
  12. - descr=$(git describe)
  13. -
  14. - # on git builds check that the version number above
  15. - # is correct...
  16. - [ "${descr%%-*}" = "v$VERSION" ] || exit 2
  17. -
  18. - echo -n 'const char iw_version[] = "' > "$OUT"
  19. - v="${descr#v}"
  20. - if git diff-index --name-only HEAD | read dummy ; then
  21. - v="$v"-dirty
  22. - fi
  23. -else
  24. - v="$VERSION"
  25. -fi
  26. +v="$VERSION"
  27. echo "const char iw_version[] = \"$v\";" > "$OUT"