set -e git_url="http://src.sugarlabs.org/write/mainline.git" # Remove the upstream cloned-directory, if any. if [ -d "activity" ]; then sudo rm -r activity fi # Clone a fresh copy of the upstream. git clone "$git_url" activity # Build the activity (to generate "generated" files such as locale files). cd activity # Pull back to this commit, to compensate for the upstream-bug http://bugs.sugarlabs.org/ticket/4482 git reset --hard 32eee190d22751e2b5cd1c7909f12e47fb587096 python setup.py build # Now, apply the AC patches. git am ../patches/*.patch # Finally, build the bundle (to be retrieved from "activity/dist"). python setup.py dist_xo