update-waf.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. # Copyright 2024 Google LLC
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. # Run this script to update waf to a newer version and get rid of the
  17. # files we do not need for Pebble SDK.
  18. set -x
  19. VERSION=2.1.4
  20. DOWNLOAD="https://waf.io/waf-$VERSION.tar.bz2"
  21. TMPFILE=`mktemp -t waf-tar-bz`
  22. # Remove existing waf folder
  23. rm -fr waf
  24. # Download and extract what we need from waf distrib
  25. wget -O - $DOWNLOAD |tar -yx \
  26. --include "waf-$VERSION/waf-light" \
  27. --include "waf-$VERSION/waflib/*" \
  28. --include "waf-$VERSION/wscript" \
  29. --exclude "waf-$VERSION/waflib/extras" \
  30. -s "/waf-$VERSION/waf/"
  31. # Add some python magic for our lib to work
  32. # (they will be copied in extras and require the init)
  33. mkdir waf/waflib/extras
  34. touch waf/waflib/extras/__init__.py