Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. root=$HOME/clutter-win32
  4. irc_relay=$HOME/local/irc-relay/bin/irc-relay
  5. irc_server=irc.gnome.org
  6. irc_port=6667
  7. irc_nickname=winbot
  8. irc_channel="#clutter"
  9.  
  10. function failmsg ()
  11. {
  12. echo "$1";
  13.  
  14. echo "$1" | \
  15. "$irc_relay" \
  16. -s "$irc_server" \
  17. -p "$irc_port" \
  18. -n "$irc_nickname" \
  19. -u "$irc_nickname" \
  20. -r "$irc_nickname" \
  21. -c "$irc_channel" \
  22. -N;
  23.  
  24. exit 1;
  25. }
  26.  
  27. function do_build ()
  28. {
  29. # Force the configure script to think we're cross compiling just
  30. # in case Wine is installed and autoconf thinks it can execute
  31. # .exe files.
  32. echo "cross_compiling=yes" > win32.cache;
  33.  
  34. ./autogen.sh --prefix="$ROOT_DIR" --host="$TARGET" --target="$TARGET" \
  35. --with-flavour=win32 --cache-file=win32.cache --disable-conformance || \
  36. return 1;
  37.  
  38. make || return 1;
  39. make install || return 1;
  40.  
  41. return 0;
  42. }
  43.  
  44. # The build-mingw32 sets up this script which installs some
  45. # environment variables that we want for building
  46. . $root/install/share/env.sh
  47.  
  48. # This should be able to build json-glib too but for now git.gnome.org
  49. # seems to be playing up
  50.  
  51. # projects=( json-glib clutter )
  52. projects=( clutter )
  53.  
  54. for prj in "${projects[@]}"; do
  55. cd "$root/$prj";
  56.  
  57. # Really really clear out any previous build
  58. git clean -f -d -x;
  59.  
  60. # Store the old HEAD so we can detect any changes
  61. old_head=`git rev-parse HEAD`;
  62.  
  63. # Fetch any new changes
  64. git pull --rebase || failmsg "Failed to pull changes for $prj";
  65.  
  66. # Check if HEAD is different
  67. if test "$old_head" != `git rev-parse HEAD`; then
  68. # Kick off a build and install
  69. do_build > "$root/build-log.txt" 2>&1;
  70. if test "$?" -ne "0"; then
  71. url=`pastebinit "$root/build-log.txt"`;
  72. failmsg "Failed to build $prj : $url";
  73. fi;
  74. fi;
  75. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement