make_dist.sh 911 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. { git log | head -n 1 | awk '{ print $2; }'; cat ../src/overpass_api/core/settings.cc; } | awk -f patch_settings.awk >_
  3. mv _ ../src/overpass_api/core/settings.cc
  4. VERSION=`cat ../src/overpass_api/core/settings.cc | grep -E '^ *version' | awk '{ print substr($1,10,length($1)-12); }'`
  5. { echo "$VERSION"; cat ../src/configure.ac; } | awk -f patch_configure_ac.awk >_
  6. mv _ ../src/configure.ac
  7. git commit -a -m "Automated commit for release $VERSION"
  8. cat ../src/Makefile.am | awk '{ if ($1 == "#SUBDIRS" && $3 == "") print substr($0,2); else if ($1 == "SUBDIRS" && $3 != "") print "#"$0; else print $0; }' >_
  9. mv _ ../src/Makefile.am
  10. cat ../src/configure.ac | awk '{ if (substr($1,1,16) == "#AC_CONFIG_FILES" && $2 == "") print substr($0,2); else if (substr($1,1,15) == "AC_CONFIG_FILES" && $2 != "") print "#"$0; else print $0; }' >_
  11. mv _ ../src/configure.ac
  12. pushd ../build
  13. make dist
  14. popd