Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- root=$HOME/clutter-win32
- irc_relay=$HOME/local/irc-relay/bin/irc-relay
- irc_server=irc.gnome.org
- irc_port=6667
- irc_nickname=winbot
- irc_channel="#clutter"
- function failmsg ()
- {
- echo "$1";
- echo "$1" | \
- "$irc_relay" \
- -s "$irc_server" \
- -p "$irc_port" \
- -n "$irc_nickname" \
- -u "$irc_nickname" \
- -r "$irc_nickname" \
- -c "$irc_channel" \
- -N;
- exit 1;
- }
- function do_build ()
- {
- # Force the configure script to think we're cross compiling just
- # in case Wine is installed and autoconf thinks it can execute
- # .exe files.
- echo "cross_compiling=yes" > win32.cache;
- ./autogen.sh --prefix="$ROOT_DIR" --host="$TARGET" --target="$TARGET" \
- --with-flavour=win32 --cache-file=win32.cache --disable-conformance || \
- return 1;
- make || return 1;
- make install || return 1;
- return 0;
- }
- # The build-mingw32 sets up this script which installs some
- # environment variables that we want for building
- . $root/install/share/env.sh
- # This should be able to build json-glib too but for now git.gnome.org
- # seems to be playing up
- # projects=( json-glib clutter )
- projects=( clutter )
- for prj in "${projects[@]}"; do
- cd "$root/$prj";
- # Really really clear out any previous build
- git clean -f -d -x;
- # Store the old HEAD so we can detect any changes
- old_head=`git rev-parse HEAD`;
- # Fetch any new changes
- git pull --rebase || failmsg "Failed to pull changes for $prj";
- # Check if HEAD is different
- if test "$old_head" != `git rev-parse HEAD`; then
- # Kick off a build and install
- do_build > "$root/build-log.txt" 2>&1;
- if test "$?" -ne "0"; then
- url=`pastebinit "$root/build-log.txt"`;
- failmsg "Failed to build $prj : $url";
- fi;
- fi;
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement