Commits

Aleš Erjavec committed 3fadf8e

Removed obsolete build scripts.

Comments (0)

Files changed (20)

install-scripts/mac/build-mpkg.sh

-#!/bin/bash -ev
-#
-# Build mpkg package from a source distribution
-#
-# $1 source (.tar.gz) distribution path
-# $2 work dir
-# $3 distribution dir (where packages will be stored and rotated
-# $4 force
-#
-# Example ./build-mpkg.sh http://pypi.python.org/packages/source/O/Orange/Orange-2.5a4.tar.gz /private/tmp /Volumes/download
-#
-
-SOURCE=$1
-WORK_DIR=$2
-DIST_DIR=$3
-FORCE=$4
-
-SOURCE_BASENAME=`basename $SOURCE`
-
-# Could check other standard extensions (zip, tgz, ...)
-DIST_NAME=${SOURCE_BASENAME%.tar.gz}
-
-echo $DIST_NAME
-
-if [ ! -e $WORK_DIR ]; then
-	mkdir -p $WORK_DIR
-fi
-
-if [ ! -e $DIST_DIR ]; then
-	mkdir -p $DIST_DIR
-fi
-
-curl --silent $SOURCE | tar -xz -C $WORK_DIR
-
-cd $WORK_DIR/$DIST_NAME
-
-# Use the system python
-/usr/bin/python setup.py bdist_mpkg --dist-dir=$DIST_DIR
-
-# Rotate the packages
-/usr/bin/python setup.py rotate --match=.mpkg --dist-dir=$DIST_DIR --keep=20
-
-true

install-scripts/mac/build-source.sh

-#!/bin/bash -e
-#
-# Build an Orange source package from a hg repo
-#
-# $1 hg repo
-# $2 local repository inside work dir
-# $3 hg revision
-# $4 work dir
-# $5 distribution name
-# $6 source and egg distribution dir ($4 by default)
-# $7 force
-#
-# Example ./build-source.sh https://bitbucket.org/biolab/orange orange tip /private/tmp/repos Orange
-
-HG_REPO=$1
-REPO_DIRNAME=$2
-HG_REV=$3
-WORK_DIR=$4
-DIST_NAME=$5
-DIST_DIR=${6:-$WORK_DIR}
-FORCE=$7
-
-# dist name with '-' replaced
-UDIST_NAME=`echo $DIST_NAME | sed s/-/_/g`
-
-LOCAL_REPO=$WORK_DIR/$REPO_DIRNAME
-
-LATEST_REVISION=`hg id -r $HG_REV $HG_REPO`
-
-if [ -e $DIST_DIR/$UDIST_NAME.egg-info/PKG-INFO ]; then
-	CURRENT_REVISION=`grep "^Version: " $DIST_DIR/$UDIST_NAME.egg-info/PKG-INFO | cut -d "-" -f 3`
-else
-	CURRENT_REVISION=""
-fi
-
-if [[ $CURRENT_REVISION != $LATEST_REVISION  || $FORCE ]]; then
-	BUILD=1
-else
-	echo "$DIST_NAME source distribution rev:$CURRENT_REVISION already exists."
-	BUILD=
-fi
-
-if [ $BUILD ]; then	
-	if [ ! -e $LOCAL_REPO ]; then
-		hg clone $HG_REPO $LOCAL_REPO
-	fi
-
-	if hg incoming -R $LOCAL_REPO; then
-		hg pull -R $LOCAL_REPO
-	fi
-
-	hg update -r $HG_REV -R $LOCAL_REPO
-
-	hg --config extensions.purge= clean --all -R $LOCAL_REPO
-
-	cd $LOCAL_REPO
-
-	# Build the source distribution
-	BUILD_TAG=`hg parent --template=".dev-r{rev}-{node|short}"`
-
-	python setup.py egg_info --tag-build=$BUILD_TAG --egg-base=$DIST_DIR sdist --dist-dir=$DIST_DIR
-	python setup.py rotate --match=.tar.gz --dist-dir=$DIST_DIR --keep=20
-fi

install-scripts/mac/bundle-build-hg.sh

-#!/bin/bash -e
-#
-# Build the orange Mac OSX bundle
-#
-# ./bundle-build-hg.sh work_dir revision bundle_output_file
-# ./bundle-build-hg.sh /private/tmp tip /private/tmp/orange-bundle-hg-tip.dmg
-#
-
-WORK_DIR=$1
-REVISION=$2
-BUNDLE=$3
-
-TMP_BUNDLE_DIR=${WORK_DIR}/bundle
-REPOS_DIR=${WORK_DIR}/repos
-
-# Remove leftovers if any
-if [ -e $TMP_BUNDLE_DIR ]; then
-	rm -rf $TMP_BUNDLE_DIR
-fi
-
-echo "Preaparing the bundle template"
-TEMPLATE_VERSION=$(curl --silent http://orange.biolab.si/download/bundle-templates/CURRENT.txt)
-curl --silent http://orange.biolab.si/download/bundle-templates/Orange-template-${TEMPLATE_VERSION}.tar.gz | tar -xz -C $WORK_DIR
-
-# Make repos dir if it does not yet exist
-if [ ! -e $REPOS_DIR ]; then
-	mkdir $REPOS_DIR
-fi
-
-APP=${TMP_BUNDLE_DIR}/Orange.app
-
-# Python interpreter in the bundle
-PYTHON=${APP}/Contents/MacOS/python
-
-# Python version
-PY_VER=`$PYTHON -c "import sys; print sys.version[:3]"`
-
-SITE_PACKAGES=${APP}/Contents/Frameworks/Python.framework/Versions/${PY_VER}/lib/python${PY_VER}/site-packages/
-
-# easy_install script in the bundle
-EASY_INSTALL=${APP}/Contents/MacOS/easy_install
-
-# pip script in the bundle
-PIP=${APP}/Contents/MacOS/pip
-
-DISTRIBUTE_VERSION="0.6.49"
-echo "Updating distribute to $DISTRIBUTE_VERSION"
-$EASY_INSTALL -U distribute==$DISTRIBUTE_VERSION
-
-# Link Python.app startup script to top bundle
-ln -fs ../Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/Python ${APP}/Contents/MacOS/PythonAppStart
-
-echo "Preparing startup scripts"
-
-# Create an enironment startup script
-cat <<-'EOF' > $APP/Contents/MacOS/ENV
-	# Create an environment for running python from the bundle
-	# Should be run as "source ENV"
-
-	BUNDLE_DIR=`dirname "$0"`/../
-	BUNDLE_DIR=`perl -MCwd=realpath -e 'print realpath($ARGV[0])' "$BUNDLE_DIR"`/
-	FRAMEWORKS_DIR="$BUNDLE_DIR"Frameworks/
-	RESOURCES_DIR="$BUNDLE_DIR"Resources/
-
-	PYVERSION="2.7"
-
-	PYTHONEXECUTABLE="$FRAMEWORKS_DIR"Python.framework/Resources/Python.app/Contents/MacOS/Python
-	PYTHONHOME="$FRAMEWORKS_DIR"Python.framework/Versions/"$PYVERSION"/
-
-	DYLD_FRAMEWORK_PATH="$FRAMEWORKS_DIR"${DYLD_FRAMEWORK_PATH:+:$DYLD_FRAMEWORK_PATH}
-
-	export PYTHONEXECUTABLE
-	export PYTHONHOME
-	export PYTHONNOUSERSITE=1
-
-	export DYLD_FRAMEWORK_PATH
-
-	# Some non framework libraries are put in $FRAMEWORKS_DIR by macho_standalone
-	export DYLD_LIBRARY_PATH="$FRAMEWORKS_DIR"${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
-EOF
-
-# Create Orange application startup script
-cat <<-'EOF' > ${APP}/Contents/MacOS/Orange
-	#!/bin/bash
-
-	DIRNAME=$(dirname "$0")
-	source "$DIRNAME"/ENV
-
-	# LaunchServices passes the Carbon process identifier to the application with
-	# -psn parameter - we do not want it
-	if [[ $1 == -psn_* ]]; then
-	    shift 1
-	fi
-
-	exec -a "$0" "$DIRNAME"/PythonAppStart -m Orange.OrangeCanvas.main "$@"
-EOF
-
-chmod +x ${APP}/Contents/MacOS/Orange
-
-
-echo "Checkouting and building orange"
-echo "==============================="
-./bundle-inject-hg.sh https://bitbucket.org/biolab/orange orange $REVISION $REPOS_DIR ${APP}
-
-echo "Specifically building orangeqt"
-echo "------------------------------"
-
-pushd $REPOS_DIR/orange/source/orangeqt
-echo "Fixing sip/pyqt configuration"
-
-sed -i.bak "s@/Users/.*/Orange.app/@$APP/@g" ${SITE_PACKAGES}/PyQt4/pyqtconfig.py
-sed -i.bak "s@/Users/.*/Orange.app/@$APP/@g" ${SITE_PACKAGES}/sipconfig.py
-export PATH=$APP/Contents/Resources/Qt4/bin:$PATH
-$PYTHON setup.py install
-
-popd
-
-echo "Fixing Qt plugins search path"
-echo "[Paths]
-Plugins = ../../../../../Resources/Qt4/plugins/" > $APP/Contents/Frameworks/Python.framework/Resources/Python.app/Contents/Resources/qt.conf
-
-echo "[Paths]
-Plugins = Resources/Qt4/plugins/" > $APP/Contents/Resources/qt.conf
-
-
-echo "Checkouting and building bioinformatics addon"
-echo "============================================="
-./bundle-inject-hg.sh https://bitbucket.org/biolab/orange-bioinformatics bioinformatics tip $REPOS_DIR ${APP}
-
-echo "Checkouting and building text addon"
-echo "==================================="
-./bundle-inject-hg.sh https://bitbucket.org/biolab/orange-text text tip $REPOS_DIR ${APP}
-
-echo "Instaling slumber library"
-echo "+++++++++++++++++++++++++"
-$EASY_INSTALL slumber
-
-echo "Installing PIL"
-echo "++++++++++++++"
-$PIP install PIL
-
-
-echo "Removing unnecessary files."
-find $TMP_BUNDLE_DIR \( -name '*~' -or -name '*.bak' -or -name '*.pyc' -or -name '*.pyo' -or -name '*.pyd' \) -exec rm -rf {} ';'
-
-ln -s ../Frameworks/Python.framework/Versions/Current/lib/python${PY_VER}/site-packages/Orange ${APP}/Contents/Resources/Orange
-
-	
-echo "Preparing the .dmg image"
-echo "========================"
-
-# Makes a link to Applications folder
-ln -s /Applications/ $TMP_BUNDLE_DIR/Applications
-
-echo "Fixing bundle permissions."
-
-{ chown -Rh root:wheel $TMP_BUNDLE_DIR; } || { echo "Could not fix bundle permissions"; }
-
-echo "Creating temporary image with the bundle."
-
-TMP_BUNDLE=${WORK_DIR}/bundle.dmg
-rm -f $TMP_BUNDLE
-
-hdiutil detach /Volumes/Orange -force || true
-hdiutil create -format UDRW -volname Orange -fs HFS+ -fsargs "-c c=64,a=16,e=16" -srcfolder $TMP_BUNDLE_DIR $TMP_BUNDLE
-MOUNT_OUTPUT=`hdiutil attach -readwrite -noverify -noautoopen $TMP_BUNDLE | egrep '^/dev/'`
-DEV_NAME=`echo -n "$MOUNT_OUTPUT" | head -n 1 | awk '{print $1}'`
-MOUNT_POINT=`echo -n "$MOUNT_OUTPUT" | tail -n 1 | awk '{print $3}'`
-
-# Makes the disk image window open automatically when mounted
-bless -openfolder "$MOUNT_POINT"
-# Hides background directory even more
-/Developer/Tools/SetFile -a V "$MOUNT_POINT/.background/"
-# Sets the custom icon volume flag so that volume has nice Orange icon after mount (.VolumeIcon.icns)
-/Developer/Tools/SetFile -a C "$MOUNT_POINT"
-
-# Might mot have permissions to do this
-{ rm -rf "$MOUNT_POINT/.Trashes/"; } || { echo "Could not remove $MOUNT_POINT/.Trashes/"; }
-
-{ rm -rf "$MOUNT_POINT/.fseventsd/"; } || { echo "Could not remove $MOUNT_POINT/.fseventsd/"; }
-
-hdiutil detach "$DEV_NAME" -force
-
-echo "Converting temporary image to a compressed image."
-
-if [ -e $BUNDLE ]; then
-	rm -f $BUNDLE
-fi
-
-hdiutil convert $TMP_BUNDLE -format UDZO -imagekey zlib-level=9 -o $BUNDLE
-
-echo "Cleaning up."
-rm -f $TMP_BUNDLE
-rm -rf $TMP_BUNDLE_DIR
-
-true

install-scripts/mac/bundle-daily-build-hg.sh

-#!/bin/bash -e
-#
-# ./bundle-daily-build-hg.sh
-#
-# $1 workdir (directory where sources can be checked out and build)
-# $2 publishdir (directory where the resulting versioned bundle can be moved)
-# $3 force (force the build even if a bundle with the same revision exists at publishdir)
-# $4 local
-#
-
-WORK_DIR=${1:-"/private/tmp"}
-PUBLISH_DIR=${2:-"$WORK_DIR/download"}
-
-FORCE=$3
-LOCAL=$4
-
-ORANGE_REPO=$WORK_DIR/repos/orange
-
-trap "echo \"Script failed\"" ERR
-
-# If possible get the orange tip revision number and check if the bundle already exists
-if [ -e $ORANGE_REPO ]; then
-	# Try to pull and update (pull returns 1 if no changesets)
-	hg pull --update -R $ORANGE_REPO || true
-	DAILY_REVISION=`hg log -r tip -R $ORANGE_REPO | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1`
-else
-	DAILY_REVISION="tip"
-fi
-
-BUNDLE="$WORK_DIR/orange-bundle-hg-$DAILY_REVISION.dmg"
-PUBLISH_BUNDLE=$PUBLISH_DIR/orange-bundle-hg-0.0.$DAILY_REVISION.dmg
-
-
-# Create the bundle if it does not yet exist
-if [[ ! -e $PUBLISH_BUNDLE || $DAILY_REVISION -eq "tip" || $FORCE ]]; then
-	echo "Building orange revision $DAILY_REVISION"
-	./bundle-build-hg.sh $WORK_DIR tip $BUNDLE
-	
-	# Get the revision again in case it was "tip"
-	DAILY_REVISION=`hg log -r tip -R $ORANGE_REPO | grep 'changeset:' | cut -d ' ' -f 4 | cut -d ':' -f 1`
-	# And update the publish bundle filename
-	PUBLISH_BUNDLE=$PUBLISH_DIR/orange-bundle-hg-0.0.$DAILY_REVISION.dmg
-
-	if [ ! $LOCAL ]; then
-		/Users/ailabc/mount-dirs.sh
-	fi
-
-	echo "Removing old versions of bundles."
-	# (Keeps last 5 versions.)
-	perl -e "unlink ((reverse sort <$PUBLISH_DIR/orange-bundle-hg-0*.dmg>)[5..10000])"
-
-	MD5=`md5 -q $BUNDLE`
-	
-	echo "Moving bundle to the download directory."
-	mv $BUNDLE $PUBLISH_BUNDLE.new
-
-	echo "Setting permissions."
-	chmod +r $PUBLISH_BUNDLE.new
-
-	# Check integrity
-	MD5_D=`md5 -q $PUBLISH_BUNDLE.new`
-	if [[ $MD5 != $MD5_D ]]; then
-		echo "Error moving the bundle in place"
-		rm $PUBLISH_BUNDLE.new
-		exit 1
-	else
-		mv $PUBLISH_BUNDLE.new $PUBLISH_BUNDLE
-	fi
-	
-	echo "Registering new bundles."
-	egrep -v '^(MAC_DAILY)=' $PUBLISH_DIR/filenames_mac.set > $PUBLISH_DIR/filenames_mac.set.new
-	echo "MAC_DAILY=orange-bundle-hg-0.0.$DAILY_REVISION.dmg" >> $PUBLISH_DIR/filenames_mac.set.new
-	mv $PUBLISH_DIR/filenames_mac.set.new $PUBLISH_DIR/filenames_mac.set
-
-else
-	echo "The bundle with revision $DAILY_REVISION already exists."
-fi

install-scripts/mac/bundle-daily-build.sh

-#!/bin/bash -e
-#
-# Should be run as: ./bundle-daily-build.sh [stable revision] [daily revision]
-#
-# If [stable revision] and/or [daily revision] is/are not specified it uses its latest revision
-#
-
-# Lists of add-ons to include
-STABLE_ADDONS=""
-DAILY_ADDONS="Bioinformatics Text"
-
-# Sets error handler
-trap "echo \"Script failed\"" ERR
-
-[ -e /Volumes/download/ ] || { echo "/Volumes/download/ not mounted."; exit 1; }
-
-if [ ! -x /usr/bin/xcodebuild ]; then
-	echo "It seems Xcode is not installed on a system."
-	exit 2
-fi
-
-# Defaults are current latest revisions in stable branch and trunk
-STABLE_REVISION_1=${1:-`svn info --non-interactive http://orange.biolab.si/svn/orange/branches/ver1.0/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`}
-# svn info does not return proper exit status on an error so we check it this way
-[ "$STABLE_REVISION_1" ] || exit 3
-STABLE_REVISION_2=${1:-`svn info --non-interactive http://orange.biolab.si/svn/orange/externals/branches/ver1.0/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`}
-# svn info does not return proper exit status on an error so we check it this way
-[ "$STABLE_REVISION_2" ] || exit 3
-if [[ $STABLE_REVISION_1 -gt $STABLE_REVISION_2 ]]; then
-    STABLE_REVISION=$STABLE_REVISION_1
-else
-    STABLE_REVISION=$STABLE_REVISION_2
-fi
-DAILY_REVISION_1=${2:-`svn info --non-interactive http://orange.biolab.si/svn/orange/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`}
-# svn info does not return proper exit status on an error so we check it this way
-[ "$DAILY_REVISION_1" ] || exit 4
-DAILY_REVISION_2=${2:-`svn info --non-interactive http://orange.biolab.si/svn/orange/externals/trunk/ | grep 'Last Changed Rev:' | cut -d ' ' -f 4`}
-# svn info does not return proper exit status on an error so we check it this way
-[ "$DAILY_REVISION_2" ] || exit 4
-if [[ $DAILY_REVISION_1 -gt $DAILY_REVISION_2 ]]; then
-    DAILY_REVISION=$DAILY_REVISION_1
-else
-    DAILY_REVISION=$DAILY_REVISION_2
-fi
-
-echo "Preparing temporary directory."
-rm -rf /private/tmp/bundle/
-	
-# Gives our Python executable to compile scripts later on
-export PATH=/private/tmp/bundle/Orange.app/Contents/MacOS/:$PATH
-
-# Enables compiling of Universal binaries
-export CFLAGS="-arch ppc -arch i386"
-export CXXFLAGS="-arch ppc -arch i386"
-export LDFLAGS="-arch ppc -arch i386"
-
-if [ ! -e /Volumes/download/orange-bundle-1.0b.$STABLE_REVISION.dmg ]; then
-	echo "Downloading bundle template."
-	svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/externals/branches/ver1.0/install-scripts/mac/bundle/ /private/tmp/bundle/
-	
-	echo "Downloading Orange stable source code revision $STABLE_REVISION."
-	svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/orange/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/
-	svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/source/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/source/
-	svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/add-ons/orngCRS/src/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/source/crs/
-	
-	[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/doc/COPYING ] || svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/COPYING /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/doc/COPYING
-	[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/doc/LICENSES ] || svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/LICENSES /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/doc/LICENSES
-	
-	ln -s ../Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/ /private/tmp/bundle/Orange.app/Contents/Resources/orange
-	ln -s ../Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/doc/ /private/tmp/bundle/Orange.app/Contents/Resources/doc
-	
-	echo "Compiling."
-	cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/source/
-	make
-	cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/source/crs/
-	make
-	mv _orngCRS.so ../../
-	cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/
-	
-	echo "Correcting install names for modules."
-	for module in *.so ; do
-		[ -L $module ] && continue
-		
-		install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/$module $module
-		
-		perl -MFile::Spec::Functions=abs2rel -e '
-		for (`/usr/bin/otool -L -X $ARGV[0]`) {
-			next unless m|^\s+(/private/tmp/bundle/Orange.app/.*) \(.*\)$|;
-			system("/usr/bin/install_name_tool", "-change", $1, "\@loader_path/" . abs2rel($1), $ARGV[0]); 
-		}
-		' $module
-	done
-	
-	echo "Cleaning up."
-	rm -rf source/ c45.dll liborange_include.a updateOrange.py
-	
-	# Installation registration
-	echo "orange" > /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange.pth
-	
-	for addon in $STABLE_ADDONS ; do
-		echo "Downloading Orange add-on $addon stable source code revision $STABLE_REVISION."
-		svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/add-ons/$addon/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/
-		
-		[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/doc/COPYING ] || svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/COPYING /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/doc/COPYING
-		[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/doc/LICENSES ] || svn export --non-interactive --revision $STABLE_REVISION http://orange.biolab.si/svn/orange/branches/ver1.0/LICENSES /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/doc/LICENSES
-		
-		if [ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/source/ ]; then
-			echo "Compiling add-on."
-			cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/source/
-			make
-			cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/
-			
-			echo "Correcting install names for modules."
-			for module in *.so ; do
-				[ -L $module ] && continue
-			
-				install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/add-ons/$addon/$module $module
-				
-				perl -MFile::Spec::Functions=abs2rel -e '
-				for (`/usr/bin/otool -L -X $ARGV[0]`) {
-					next unless m|^\s+(/private/tmp/bundle/Orange.app/.*) \(.*\)$|;
-					system("/usr/bin/install_name_tool", "-change", $1, "\@loader_path/" . abs2rel($1), $ARGV[0]); 
-				}
-				' $module
-			done
-		fi
-		
-		echo "Cleaning up."
-		rm -rf source/ setup.py
-		
-		# Installation registration
-		echo "orange/add-ons/$addon" > /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/orange-`echo $addon | tr "[:upper:]" "[:lower:]"`.pth
-	done
-	
-	echo "Removing unnecessary files."
-	find /private/tmp/bundle/ \( -name '*~' -or -name '*.bak' -or -name '*.pyc' -or -name '*.pyo' -or -name '*.pyd' \) -exec rm -rf {} ';'
-	
-	# Makes a link to Applications folder
-	ln -s /Applications/ /private/tmp/bundle/Applications
-	
-	echo "Fixing bundle permissions."
-	chown -Rh root:wheel /private/tmp/bundle/
-	
-	echo "Creating temporary image with the bundle."
-	rm -f /private/tmp/bundle.dmg
-	hdiutil detach /Volumes/Orange -force || true
-	hdiutil create -format UDRW -volname Orange -fs HFS+ -fsargs "-c c=64,a=16,e=16" -srcfolder /private/tmp/bundle/ /private/tmp/bundle.dmg
-	MOUNT_OUTPUT=`hdiutil attach -readwrite -noverify -noautoopen /private/tmp/bundle.dmg | egrep '^/dev/'`
-	DEV_NAME=`echo -n "$MOUNT_OUTPUT" | head -n 1 | awk '{print $1}'`
-	MOUNT_POINT=`echo -n "$MOUNT_OUTPUT" | tail -n 1 | awk '{print $3}'`
-	
-	# Makes the disk image window open automatically when mounted
-	bless -openfolder "$MOUNT_POINT"
-	# Hides background directory even more
-	/Developer/Tools/SetFile -a V "$MOUNT_POINT/.background/"
-	# Sets the custom icon volume flag so that volume has nice Orange icon after mount (.VolumeIcon.icns)
-	/Developer/Tools/SetFile -a C "$MOUNT_POINT"
-	
-	rm -rf "$MOUNT_POINT/.Trashes/"
-	rm -rf "$MOUNT_POINT/.fseventsd/"
-	
-	hdiutil detach "$DEV_NAME" -force
-	
-	echo "Converting temporary image to a compressed image."
-	rm -f /private/tmp/orange-bundle-1.0b.$STABLE_REVISION.dmg
-	hdiutil convert /private/tmp/bundle.dmg -format UDZO -imagekey zlib-level=9 -o /private/tmp/orange-bundle-1.0b.$STABLE_REVISION.dmg
-	
-	echo "Cleaning up."
-	rm -f /private/tmp/bundle.dmg
-	rm -rf /private/tmp/bundle/
-fi
-
-# TODO: Should be called only on a daily build server and not if building locally
-/Users/ailabc/mount-dirs.sh
-
-if [ ! -e /Volumes/download/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ]; then
-	echo "Downloading bundle template."
-	svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/externals/trunk/install-scripts/mac/bundle/ /private/tmp/bundle/
-	
-	echo "Downloading Orange daily source code revision $DAILY_REVISION."
-	svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/orange/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/
-	svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/source/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/
-	svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/add-ons/orngCRS/src/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/crs/
-	
-	[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/COPYING ] || svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/COPYING /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/COPYING
-	[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/LICENSES ] || svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/LICENSES /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/LICENSES
-	
-	ln -s ../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/ /private/tmp/bundle/Orange.app/Contents/Resources/orange
-	ln -s ../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/doc/ /private/tmp/bundle/Orange.app/Contents/Resources/doc
-	
-	echo "Compiling."
-	cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/
-	make EXCLUDE_ORANGEQT=1
-	cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/source/crs/
-	make
-	mv _orngCRS.so ../../
-	cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/
-	
-	echo "Correcting install names for modules."
-	for module in *.so ; do
-		[ -L $module ] && continue
-		
-		install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/$module $module
-		
-		perl -MFile::Spec::Functions=abs2rel -e '
-		for (`/usr/bin/otool -L -X $ARGV[0]`) {
-			next unless m|^\s+(/private/tmp/bundle/Orange.app/.*) \(.*\)$|;
-			system("/usr/bin/install_name_tool", "-change", $1, "\@loader_path/" . abs2rel($1), $ARGV[0]); 
-		}
-		' $module
-	done
-	
-	echo "Cleaning up."
-	rm -rf source/ c45.dll liborange_include.a updateOrange.py
-	
-	# Installation registration
-	echo "orange" > /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange.pth
-	
-	for addon in $DAILY_ADDONS ; do
-		echo "Downloading Orange add-on $addon daily source code revision $DAILY_REVISION."
-		svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/add-ons/$addon/ /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/
-		
-		[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/doc/COPYING ] || svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/COPYING /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/doc/COPYING
-		[ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/doc/LICENSES ] || svn export --non-interactive --revision $DAILY_REVISION http://orange.biolab.si/svn/orange/trunk/LICENSES /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/doc/LICENSES
-		
-		if [ -e /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/source/ ]; then
-			echo "Compiling add-on."
-			cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/source/
-			make
-			cd /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/
-			
-			echo "Correcting install names for modules."
-			for module in *.so ; do
-				[ -L $module ] && continue
-			
-				install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/add-ons/$addon/$module $module
-				
-				perl -MFile::Spec::Functions=abs2rel -e '
-				for (`/usr/bin/otool -L -X $ARGV[0]`) {
-					next unless m|^\s+(/private/tmp/bundle/Orange.app/.*) \(.*\)$|;
-					system("/usr/bin/install_name_tool", "-change", $1, "\@loader_path/" . abs2rel($1), $ARGV[0]); 
-				}
-				' $module
-			done
-		fi
-		
-		echo "Cleaning up."
-		rm -rf source/ setup.py
-		
-		# Installation registration
-		echo "orange/add-ons/$addon" > /private/tmp/bundle/Orange.app/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange-`echo $addon | tr "[:upper:]" "[:lower:]"`.pth
-	done
-	
-	echo "Removing unnecessary files."
-	find /private/tmp/bundle/ \( -name '*~' -or -name '*.bak' -or -name '*.pyc' -or -name '*.pyo' -or -name '*.pyd' \) -exec rm -rf {} ';'
-	
-	# Makes a link to Applications folder
-	ln -s /Applications/ /private/tmp/bundle/Applications
-
-	echo "Fixing bundle permissions."
-	chown -Rh root:wheel /private/tmp/bundle/
-	
-	echo "Creating temporary image with the bundle."
-	rm -f /private/tmp/bundle.dmg
-	hdiutil detach /Volumes/Orange -force || true
-	hdiutil create -format UDRW -volname Orange -fs HFS+ -fsargs "-c c=64,a=16,e=16" -srcfolder /private/tmp/bundle/ /private/tmp/bundle.dmg
-	MOUNT_OUTPUT=`hdiutil attach -readwrite -noverify -noautoopen /private/tmp/bundle.dmg | egrep '^/dev/'`
-	DEV_NAME=`echo -n "$MOUNT_OUTPUT" | head -n 1 | awk '{print $1}'`
-	MOUNT_POINT=`echo -n "$MOUNT_OUTPUT" | tail -n 1 | awk '{print $3}'`
-	
-	# Makes the disk image window open automatically when mounted
-	bless -openfolder "$MOUNT_POINT"
-	# Hides background directory even more
-	/Developer/Tools/SetFile -a V "$MOUNT_POINT/.background/"
-	# Sets the custom icon volume flag so that volume has nice Orange icon after mount (.VolumeIcon.icns)
-	/Developer/Tools/SetFile -a C "$MOUNT_POINT"
-	
-	rm -rf "$MOUNT_POINT/.Trashes/"
-	rm -rf "$MOUNT_POINT/.fseventsd/"
-	
-	hdiutil detach "$DEV_NAME" -force
-	
-	echo "Converting temporary image to a compressed image."
-	rm -f /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg
-	hdiutil convert /private/tmp/bundle.dmg -format UDZO -imagekey zlib-level=9 -o /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg
-	
-	echo "Cleaning up."
-	rm -f /private/tmp/bundle.dmg
-	rm -rf /private/tmp/bundle/
-fi
-
-# TODO: Should be called only on a daily build server and not if building locally
-/Users/ailabc/mount-dirs.sh
-
-echo "Removing old versions of bundles."
-# (Keeps last 5 versions.)
-perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-svn-0*.dmg>)[5..10000])'
-perl -e 'unlink ((reverse sort </Volumes/download/orange-bundle-1*.dmg>)[5..10000])'
-
-if [ -e /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ] || [ -e /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ]; then
-	echo "Moving bundles to the download directory."
-	[ -e /private/tmp/orange-bundle-1.0b.$STABLE_REVISION.dmg ] && mv /private/tmp/orange-bundle-1.0b.$STABLE_REVISION.dmg /Volumes/download/
-	[ -e /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg ] && mv /private/tmp/orange-bundle-svn-0.0.$DAILY_REVISION.dmg /Volumes/download/
-	
-	echo "Setting permissions."
-	chmod +r /Volumes/download/orange-bundle-1.0b.$STABLE_REVISION.dmg
-	chmod +r /Volumes/download/orange-bundle-svn-0.0.$DAILY_REVISION.dmg
-	
-	echo "Registering new bundles."
-	egrep -v '^(MAC_STABLE|MAC_DAILY)=' /Volumes/download/filenames_mac.set > /Volumes/download/filenames_mac.set.new
-	echo "MAC_STABLE=orange-bundle-1.0b.$STABLE_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new
-	echo "MAC_DAILY=orange-bundle-svn-0.0.$DAILY_REVISION.dmg" >> /Volumes/download/filenames_mac.set.new
-	mv /Volumes/download/filenames_mac.set.new /Volumes/download/filenames_mac.set
-fi

install-scripts/mac/bundle-inject-hg.sh

-#!/bin/bash -e
-#
-# Install an setup.py installable package from a 
-# hg repository in to a .app bundle template
-#
-# $1 hg repo path
-# $2 repo clone name inside the working dir
-# $3 revision
-# $4 working directory where the repos will be cloned
-# $5 bundle template path
-#
-
-REPO=$1
-CLONE_NAME=$2
-REVISION=$3
-WORK_DIR=$4
-TEMPLATE_PATH=$5
-
-# Python interpreter in the bundle 
-PYTHON=${TEMPLATE_PATH}/Contents/MacOS/python
-
-# Sets error handler
-trap "echo \"Script failed\"" ERR
-
-# Path to the local repo clone
-CLONE_FULLPATH=${WORK_DIR}/${CLONE_NAME}
-
-if [ ! -e $CLONE_FULLPATH ]; then
-	echo "Cloning $REPO to $CLONE_FULLPATH"
-	hg clone $REPO $CLONE_FULLPATH
-else
-	echo "Repository $CLONE_FULLPATH already present".
-fi
-
-cd $CLONE_FULLPATH
-
-echo "Checking for incomming changesets"
-if hg incoming; then
-	echo "Changesets found. Pulling."
-	hg pull
-fi
-
-echo "Updating to ${REVISION}"
-hg update -r ${REVISION}
-
-# Run installation
-echo "Running setup.py install with python '$PYTHON'"
-$PYTHON setup.py install --single-version-externally-managed --record=RECORD.txt
-
-true

install-scripts/mac/bundle-inject-pypi.sh

-#!/bin/bash -ev
-#
-# Install an setup.py installable package from 
-# pypi
-#
-# $1 package name including the version (e.g. 'suds-0.4')
-# $2 pypi url of the source package
-# $3 work dir where the package will be downloaded and build
-# $4 bundle template path
-#
-
-PACKAGE=$1
-PACKAGE_URL=$2
-WORK_DIR=$3
-TEMPLATE_PATH=$4
-
-# Python interpreter in the bundle 
-PYTHON=${TEMPLATE_PATH}/Contents/MacOS/python
-
-SOURCE_DIR="$WORK_DIR/$PACKAGE"
-SOURCE_TAR=${SOURCE_DIR}.tar.gz
-
-# Sets error handler
-trap "echo \"Script failed\"" ERR
-
-curl --silent -o $SOURCE_TAR $PACKAGE_URL
-
-tar -xf $SOURCE_TAR -C $WORK_DIR
-
-cd $SOURCE_DIR
-$PYTHON setup.py install
-
-cd ..
-
-rm -rf $SOURCE_DIR
-rm -rf $SOURCE_TAR
-
-# 0 exit status
-true

install-scripts/mac/dailyrun-bundleonly-hg.sh

-#!/bin/bash
-#
-# Should be run as: sudo ./dailyrun-bundleonly-hg.sh
-#
-
-export PATH=$HOME/bin:$PATH
-
-MAC_VERSION=`sw_vers -productVersion | cut -d '.' -f 2`
-
-defaults write com.apple.desktopservices DSDontWriteNetworkStores true
-
-/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-
-/Users/ailabc/bundle-daily-build-hg.sh /private/tmp /Volumes/download &> /private/tmp/bundle-daily-build-hg.log
-EXIT_VALUE=$?
-
-/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-
-LOG_FILE="/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build-hg.log"
-
-echo "Orange (bundle $MAC_VERSION) [$EXIT_VALUE]" > $LOG_FILE
-date >> $LOG_FILE
-cat /private/tmp/bundle-daily-build-hg.log >> $LOG_FILE
-(($EXIT_VALUE)) && echo "Running bundle-daily-build-hg.sh failed"
-
-# Zero exit value
-true

install-scripts/mac/dailyrun-bundleonly.sh

-#!/bin/bash
-#
-# Should be run as: sudo ./dailyrun-bundleonly.sh
-#
-
-MAC_VERSION=`sw_vers -productVersion | cut -d '.' -f 2`
-ARCH=`perl -MFink::FinkVersion -e 'print Fink::FinkVersion::get_arch'`
-
-defaults write com.apple.desktopservices DSDontWriteNetworkStores true
-
-/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-
-/Users/ailabc/bundle-daily-build.sh &> /private/tmp/bundle-daily-build.log
-EXIT_VALUE=$?
-
-/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-
-echo "Orange (bundle $MAC_VERSION) [$EXIT_VALUE]" > "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build.log"
-date >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build.log"
-cat /private/tmp/bundle-daily-build.log >> "/Volumes/download/buildLogs/osx/bundle-$MAC_VERSION-daily-build.log"
-(($EXIT_VALUE)) && echo "Running bundle-daily-build.sh failed"
-
-# Zero exit value
-true

install-scripts/mac/dailyrun-sources.sh

-#!/bin/bash -e
-#
-# Should be run as: sudo ./dailyrun-sources.sh work/dir
-#
-# $1 work dir
-# $2 local build
-# $3 force
-
-WORK_DIR=${1:-"/private/tmp"}
-
-LOCAL=$2
-FORCE=$3
-
-test -r /sw/bin/init.sh && . /sw/bin/init.sh
-
-export PATH=$HOME/bin:$PATH
-
-if [ $LOCAL ]; then
-	PUBLISH_DIR=$WORK_DIR/download/sources
-else
-	PUBLISH_DIR=/Volumes/download/sources
-fi
-
-if [ ! -e $WORK_DIR ]; then
-	mkdir -p $WORK_DIR
-fi
-
-
-REPO_DIR=$WORK_DIR/repos
-
-defaults write com.apple.desktopservices DSDontWriteNetworkStores true
-
-if [ ! $LOCAL ]; then
-	/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-fi
-
-if [ ! -e $PUBLISH_DIR ]; then
-	mkdir -p $PUBLISH_DIR
-fi
-
-# Build source packages
-./build-source.sh https://bitbucket.org/biolab/orange orange tip $REPO_DIR Orange $PUBLISH_DIR $FORCE
-./build-source.sh https://bitbucket.org/biolab/orange-bioinformatics bioinformatics tip $REPO_DIR Orange-Bioinformatics $PUBLISH_DIR $FORCE
-./build-source.sh https://bitbucket.org/biolab/orange-text text tip $REPO_DIR Orange-Text $PUBLISH_DIR $FORCE
-
-true

install-scripts/mac/dailyrun.sh

-#!/bin/bash
-#
-# Should be run as: sudo ./dailyrun.sh
-#
-# $1 workdir
-# $2 force
-# $3 local
-
-WORK_DIR=${1:-"/private/tmp"}
-FORCE=$2
-LOCAL=$3
-
-MAC_VERSION=`sw_vers -productVersion | cut -d '.' -f 2`
-
-test -r /sw/bin/init.sh && . /sw/bin/init.sh
-
-export PATH=$HOME/bin:$PATH
-
-if [ $LOCAL ]; then
-	PUBLISH_DIR=$WORK_DIR/download
-	LOG_DIR=$WORK_DIR/logs
-	mkdir -p $PUBLISH_DIR
-	mkdir -p $LOG_DIR
-else
-	PUBLISH_DIR=/Volumes/download
-	LOG_DIR=/Volumes/download/buildLogs/osx
-fi
-
-if [ ! -e $WORK_DIR ]; then
-	mkdir -p $WORK_DIR
-fi
-
-SOURCES_DIR=$PUBLISH_DIR/sources
-
-defaults write com.apple.desktopservices DSDontWriteNetworkStores true
-
-if [ ! $LOCAL ]; then
-	/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-fi
-
-# Get old source addon versions from PKG-INFO files (these are updated by dailyrun-sources)
-OLD_ORANGE_VERSION=`grep "^Version:" $SOURCES_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2`
-OLD_BIOINFORMATICS_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2`
-OLD_TEXT_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Text.egg-info/PKG-INFO | cut -d " " -f 2`
-
-
-SOURCE_LOG=$WORK_DIR/sources-daily-build.log
-
-./dailyrun-sources.sh $WORK_DIR $FORCE $LOCAL &> $SOURCE_LOG
-EXIT_VALUE=$?
-
-echo "Orange (sources) [ $EXIT_VALUE ]" > "$LOG_DIR/source-daily-build-hg.log"
-date >> "$LOG_DIR/source-daily-build-hg.log"
-cat $SOURCE_LOG >> "$LOG_DIR/source-daily-build-hg.log"
-(($EXIT_VALUE)) && echo "Daily sources failed"
-
-
-# Get new versions from PKG-INFO files (these are updated by dailyrun-sources)
-ORANGE_VERSION=`grep "^Version:" $SOURCES_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2`
-BIOINFORMATICS_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2`
-TEXT_VERSION=`grep "^Version:" $SOURCES_DIR/Orange_Text.egg-info/PKG-INFO | cut -d " " -f 2`
-
-
-# Source filenames
-ORANGE_SOURCE="Orange-${ORANGE_VERSION}.tar.gz"
-BIOINFORMATICS_SOURCE="Orange-Bioinformatics-${BIOINFORMATICS_VERSION}.tar.gz"
-TEXT_SOURCE="Orange-Text-${TEXT_VERSION}.tar.gz"
-
-
-# Get source packages md5 checksum
-ORANGE_SOURCE_MD5=`md5 -q $SOURCES_DIR/$ORANGE_SOURCE`
-BIOINFORMATICS_SOURCE_MD5=`md5 -q $SOURCES_DIR/$BIOINFORMATICS_SOURCE`
-TEXT_SOURCE_MD5=`md5 -q $SOURCES_DIR/$TEXT_SOURCE`
-
-# Are there new versions of orange and addons available.
-if [[ $OLD_ORANGE_VERSION < $ORANGE_VERSION ]]; then
-	NEW_ORANGE=1
-fi
-
-if [[ $OLD_BIOINFORMATICS_VERSION < $BIOINFORMATICS_VERSION ]]; then
-	NEW_BIOINFORMATICS=1
-	NEW_BUNDLE_ADDONS=1
-fi
-
-if [[ $OLD_TEXT_VERSION < $TEXT_VERSION ]]; then
-	NEW_TEXT=1
-	NEW_BUNDLE_ADDONS=1
-fi
-
-## Daily bundle build from hg (for now always until versioning is established).
-if [[ true || $NEW_ORANGE || $NEW_BIOINFORMATICS || $NEW_TEXT || $FORCE ]]; then
-	./bundle-daily-build-hg.sh "$WORK_DIR" "$PUBLISH_DIR" $NEW_BUNDLE_ADDONS &> $WORK_DIR/bundle-daily-build.log
-	EXIT_VALUE=$?
-fi
-
-if [ ! $LOCAL ]; then
-	/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-fi
-
-echo "Orange (bundle $MAC_VERSION from hg) [$EXIT_VALUE]" > "$LOG_DIR/bundle-$MAC_VERSION-daily-build-hg.log"
-date >> "$LOG_DIR/bundle-$MAC_VERSION-daily-build-hg.log"
-cat $WORK_DIR/bundle-daily-build.log >> "$LOG_DIR/bundle-$MAC_VERSION-daily-build-hg.log"
-(($EXIT_VALUE)) && echo "Running bundle-daily-build-hg.sh failed"
-
-
-#MAC_VERSION=`sw_vers -productVersion | cut -d '.' -f 2`
-#ARCH=`perl -MFink::FinkVersion -e 'print Fink::FinkVersion::get_arch'`
-#
-#FINK_ROOT=/sw
-#
-#if [ ! $LOCAL ]; then
-#	# Compare with the published info files
-#	BASE="http://orange.biolab.si/fink/dists/$ARCH/main/finkinfo"
-#else
-#	# Compare with the local info files
-#	BASE="file://$FINK_ROOT/fink/dists/local/main/finkinfo"
-#fi
-#
-#
-#OLD_ORANGE_VERSION=`curl --silent $BASE/orange-gui-dev-py.info | grep "Version: " | cut -d" " -f 2`
-#OLD_BIOINFORMATICS_VERSION=`curl --silent $BASE/orange-bioinformatics-gui-dev-py.info | grep "Version: " | cut -d" " -f 2`
-#OLD_TEXT_VERSION=`curl --silent $BASE/orange-text-gui-dev-py.info | grep "Version: " | cut -d" " -f 2`
-#
-#if [[ $OLD_ORANGE_VERSION < $ORANGE_VERSION ]]; then
-#	NEW_ORANGE=1
-#fi
-#
-#if [[ $OLD_BIOINFORMATICS_VERSION < $BIOINFORMATICS_VERSION ]]; then
-#	NEW_BIOINFORMATICS=1
-#fi
-#
-#if [[ $OLD_TEXT_VERSION < $TEXT_VERSION ]]; then
-#	NEW_TEXT=1
-#fi
-#
-#
-## Base url for sources in fink .info files
-#if [ $LOCAL ]; then
-#	BASE_URL="file://$PUBLISH_DIR/sources"
-#else
-#	BASE_URL="http://orange.biolab.si/download/sources"
-#fi
-#
-## Update the local finkinfo
-## Local info files will be moved to biolab/main/finkinfo in fink-daily-build-packages.sh
-#FINK_INFO_DIR="$FINK_ROOT/fink/dists/local/main/finkinfo"
-#
-#if [ ! -e $FINK_INFO_DIR ]; then
-#	mkdir -p $FINK_INFO_DIR
-#fi
-#
-## Remove any old remaining local .info files
-#rm -f $FINK_INFO_DIR/orange-*.info
-#
-## Directory where fink .info templates are
-#FINK_TEMPLATES=$WORK_DIR/orange/install-scripts/mac/fink
-#
-#FINK_LOG=$WORK_DIR/fink-daily-build.log
-#echo "" > $FINK_LOG
-#
-#if [[ $NEW_ORANGE || $FORCE ]]; then
-#	FINK_ORANGE_SOURCE_TEMPLATE="Orange-%v.tar.gz"
-#	./fink-register-info.sh "$FINK_TEMPLATES/orange-gui-dev-py.info" $BASE_URL/$FINK_ORANGE_SOURCE_TEMPLATE $ORANGE_SOURCE_MD5 $ORANGE_VERSION $FINK_INFO_DIR/orange-gui-dev-py.info >> $FINK_LOG 2>&1
-#	FINK_ORANGE_INFO_EXIT_VALUE=$?
-#fi
-#
-#if [[ $NEW_BIOINFORMATICS || $FORCE ]]; then
-#	FINK_BIOINFORMATICS_SOURCE_TEMPLATE="Orange-Bioinformatics-%v.tar.gz"
-#	./fink-register-info.sh "$FINK_TEMPLATES/orange-bioinformatics-gui-dev-py.info" $BASE_URL/$FINK_BIOINFORMATICS_SOURCE_TEMPLATE $BIOINFORMATICS_SOURCE_MD5 $BIOINFORMATICS_VERSION $FINK_INFO_DIR/orange-bioinformatics-gui-dev-py.info >> $FINK_LOG 2>&1
-#	FINK_BIOINFORMATICS_INFO_EXIT_VALUE=$?
-#fi
-#
-#if [[ $NEW_TEXT || $FORCE ]]; then
-#	FINK_TEXT_SOURCE_TEMPLATE="Orange-Text-%v.tar.gz"
-#	./fink-register-info.sh "$FINK_TEMPLATES/orange-text-gui-dev-py.info" $BASE_URL/$FINK_TEXT_SOURCE_TEMPLATE $TEXT_SOURCE_MD5 $TEXT_VERSION $FINK_INFO_DIR/orange-text-gui-dev-py.info >> $FINK_LOG 2>&1
-#	FINK_TEXT_INFO_EXIT_VALUE=$?
-#fi
-#
-#if [ ! $LOCAL ]; then
-#	/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-#fi
-#
-#EXIT_VALUE=$(($FINK_ORANGE_INFO_EXIT_VALUE + $FINK_BIOINFORMATICS_INFO_EXIT_VALUE + $FINK_TEXT_INFO_EXIT_VALUE))
-#if (($EXIT_VALUE)); then
-#	echo "Running fink-register-info.sh failed"
-#	rm -f $FINK_INFO_DIR/orange-*.info
-#fi
-#
-### daily fink build
-#
-#./fink-daily-build-packages.sh &> $WORK_DIR/fink-daily-build-packages.log
-#EXIT_VALUE=$?
-#
-#if [ ! $LOCAL ]; then
-#	/Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
-#fi
-#
-#echo "Orange (fink $MAC_VERSION $ARCH) [$EXIT_VALUE]" > "$LOG_DIR/fink-$MAC_VERSION-$ARCH-daily-build.log"
-#date >> "$LOG_DIR/fink-$MAC_VERSION-$ARCH-daily-build.log"
-#cat $WORK_DIR/fink-daily-build-packages.log >> "$LOG_DIR/fink-$MAC_VERSION-$ARCH-daily-build.log"
-#(($EXIT_VALUE)) && echo "Running fink-daily-build.sh failed"
-
-# Zero exit value
-true

install-scripts/mac/mount-dirs.sh

-#!/bin/bash -e
-
-if [ -e /Library/Filesystems/fusefs.fs/Support/fusefs.kext ]; then
-	kextload -q /Library/Filesystems/fusefs.fs/Support/fusefs.kext
-fi
-
-#umount /Volumes/fink/ 2> /dev/null || true
-#sleep 5
-#mkdir -p /Volumes/fink/
-#/Users/ailabc/Downloads/sshfs-binaries/sshfs-static-leopard -o reconnect,workaround=nonodelay,uid=$(id -u),gid=$(id -g) fink@biolab.si:/files /Volumes/fink/
-
-umount /Volumes/download/ 2> /dev/null || true
-sleep 5
-mkdir -p /Volumes/download/
-/Users/ailabc/Downloads/sshfs-binaries/sshfs-static-leopard -o reconnect,workaround=nonodelay,uid=$(id -u),gid=$(id -g) download@biolab.si:/files /Volumes/download/
-
-sleep 5

install-scripts/mac/update-all-scripts.sh

-#!/bin/bash
-#
-# Should be run as: ./update-all-scripts.sh
-#
-
-curl --silent --output update-all-scripts.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/update-all-scripts.sh
-curl --silent --output bundle-64bit-daily-build.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/bundle-64bit-daily-build.sh
-curl --silent --output bundle-daily-build.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/bundle-daily-build.sh
-curl --silent --output dailyrun.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/dailyrun.sh
-#curl --silent --output dailyrun-finkonly-withsource.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/dailyrun-finkonly-withsource.sh
-#curl --silent --output dailyrun-finkonly.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/dailyrun-finkonly.sh
-curl --silent --output dailyrun-bundleonly.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/dailyrun-bundleonly.sh
-#curl --silent --output fink-daily-build.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink-daily-build.sh
-#curl --silent --output fink-restore-selections.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink-restore-selections.sh
-#curl --silent --output fink-selfupdate-orange.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink-selfupdate-orange.sh
-#curl --silent --output force-fink-daily-build.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/force-fink-daily-build.sh
-curl --silent --output mount-dirs.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/mount-dirs.sh
-
-curl --silent --output bundle-build-hg.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/bundle-build-hg.sh
-curl --silent --output bundle-daily-build-hg.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/bundle-daily-build-hg.sh
-curl --silent --output bundle-inject-hg.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/bundle-inject-hg.sh
-curl --silent --output bundle-inject-pypi.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/bundle-inject-pypi.sh
-curl --silent --output dailyrun-bundleonly-hg.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/dailyrun-bundleonly-hg.sh
-#curl --silent --output fink-daily-build-packages.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink-daily-build-packages.sh
-#curl --silent --output fink-register-info.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/fink-register-info.sh
-curl --silent --output build-source.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/build-source.sh
-curl --silent --output dailyrun-sources.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/dailyrun-sources.sh
-curl --silent --output build-mpkg.sh https://bitbucket.org/biolab/orange/raw/tip/install-scripts/mac/build-mpkg.sh
-
-chmod +x *.sh
-
-# Zero exit value
-true

install-scripts/vmware/vmware-dailyrun-addon-packaging.sh

-#!/bin/bash -e
-#
-# Should be run as: ./wmvare-dailyrun-winxp.sh
-#
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-VMIMAGE='/Volumes/Data/vmware/Orange Add-on Packaging/Orange Add-on Packaging.vmx'
-WAIT_START_TIME=300
-WAIT_STOP_TIME=600
-IP_ADDRESS='172.16.213.134'
-NAME='Orange Add-on Packaging'
-
-# We use public/private keys SSH authentication so no need for a password
-
-start_vmware() {
-    if "$VMRUN" list | grep -q "$VMIMAGE"; then
-        echo "[$NAME] VMware is already running."
-        exit 1
-    fi
-    
-    # We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-    "$VMRUN" start "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' || true
-    ps=("${PIPESTATUS[@]}")
-    # PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-    if ((${ps[0]})); then
-        echo "[$NAME] Could not start VMware."
-        exit 2
-    fi
-    
-    # Wait for VMware and OS to start
-    sleep $WAIT_START_TIME
-    
-    return 0
-}
-
-stop_vmware() {
-    ssh root@$IP_ADDRESS "/sbin/shutdown -h now > /dev/null"
-    
-    # Wait for OS to stop
-    sleep $WAIT_STOP_TIME
-    
-    if "$VMRUN" list | grep -q "$VMIMAGE"; then
-        echo "[$NAME] Have to force shutdown."
-        # We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-        "$VMRUN" stop "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-        ps=("${PIPESTATUS[@]}")
-        # PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-        if ((${ps[0]})); then
-            echo "[$NAME] Could not stop VMware."
-            exit 3
-        fi
-    fi
-    
-    return 0
-}
-
-start_vmware
-
-ssh root@$IP_ADDRESS "/root/update-and-run.sh"
-
-stop_vmware

install-scripts/vmware/vmware-dailyrun-debian.sh

-#!/bin/bash
-#
-# Should be run as: ./wmvare-dailyrun-debian.sh
-#
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-VMIMAGE='/Volumes/Data/vmware/Debian 5.vmwarevm/Debian 5.vmx'
-WAIT_START_TIME=300
-WAIT_STOP_TIME=600
-IP_ADDRESS='172.16.213.102'
-NAME='Debian 5'
-
-# We use public/private keys SSH authentication so no need for a password
-
-start_vmware() {
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] VMware is already running."
-		exit 1
-	fi
-	
-	# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-	"$VMRUN" start "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure'
-	ps=("${PIPESTATUS[@]}")
-	# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-	if ((${ps[0]})); then
-		echo "[$NAME] Could not start VMware."
-		exit 2
-	fi
-	
-	# Wait for VMware and OS to start
-	sleep $WAIT_START_TIME
-	
-	return 0
-}
-
-stop_vmware() {
-	ssh root@$IP_ADDRESS "/sbin/shutdown -h now > /dev/null"
-	
-	# Wait for OS to stop
-	sleep $WAIT_STOP_TIME
-	
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] Have to force shutdown."
-		# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-		"$VMRUN" stop "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-		ps=("${PIPESTATUS[@]}")
-		# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-		if ((${ps[0]})); then
-			echo "[$NAME] Could not stop VMware."
-			exit 3
-		fi
-	fi
-	
-	return 0
-}
-
-start_vmware
-
-# We run it twice so that we also use maybe updated "update-all-scripts.sh" script
-ssh root@$IP_ADDRESS "/root/update-all-scripts.sh"
-ssh root@$IP_ADDRESS "/root/update-all-scripts.sh"
-
-ssh root@$IP_ADDRESS "/root/dailyrun.sh"
-
-stop_vmware

install-scripts/vmware/vmware-dailyrun-debian64.sh

-#!/bin/bash
-#
-# Should be run as: ./wmvare-dailyrun-debian64.sh
-#
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-VMIMAGE='/Volumes/Data/vmware/Debian 5 64-bit.vmwarevm/Debian 5 64-bit.vmx'
-WAIT_START_TIME=300
-WAIT_STOP_TIME=600
-IP_ADDRESS='172.16.213.103'
-NAME='Debian 5 64-bit'
-
-# We use public/private keys SSH authentication so no need for a password
-
-start_vmware() {
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] VMware is already running."
-		exit 1
-	fi
-	
-	# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-	"$VMRUN" start "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure'
-	ps=("${PIPESTATUS[@]}")
-	# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-	if ((${ps[0]})); then
-		echo "[$NAME] Could not start VMware."
-		exit 2
-	fi
-	
-	# Wait for VMware and OS to start
-	sleep $WAIT_START_TIME
-	
-	return 0
-}
-
-stop_vmware() {
-	ssh root@$IP_ADDRESS "/sbin/shutdown -h now > /dev/null"
-	
-	# Wait for OS to stop
-	sleep $WAIT_STOP_TIME
-	
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] Have to force shutdown."
-		# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-		"$VMRUN" stop "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-		ps=("${PIPESTATUS[@]}")
-		# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-		if ((${ps[0]})); then
-			echo "[$NAME] Could not stop VMware."
-			exit 3
-		fi
-	fi
-	
-	return 0
-}
-
-start_vmware
-
-# We run it twice so that we also use maybe updated "update-all-scripts.sh" script
-ssh root@$IP_ADDRESS "/root/update-all-scripts.sh"
-ssh root@$IP_ADDRESS "/root/update-all-scripts.sh"
-
-ssh root@$IP_ADDRESS "/root/dailyrun.sh"
-
-stop_vmware

install-scripts/vmware/vmware-dailyrun-macosx-5.sh

-#!/bin/bash
-#
-# Should be run as: ./wmvare-dailyrun-macosx-5.sh [bundle only]
-#
-# If [bundle only] is given it only builds the bundle
-#
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-VMIMAGE='/Volumes/Data/vmware/Mac OS X Server 10.5 64-bit.vmwarevm/Mac OS X Server 10.5 64-bit.vmx'
-WAIT_START_TIME=300
-WAIT_STOP_TIME=600
-WAIT_RESTART_TIME=120
-RETRIES=5
-IP_ADDRESS='172.16.213.100'
-NAME='Mac OS X 10.5'
-
-if [ "$1" ]; then
-	BUNDLE_ONLY=1
-fi
-
-# We use public/private keys SSH authentication so no need for a password
-
-start_vmware() {
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] VMware is already running."
-		exit 1
-	fi
-	
-	# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-	"$VMRUN" start "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure'
-	ps=("${PIPESTATUS[@]}")
-	# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-	if ((${ps[0]})); then
-		echo "[$NAME] Could not start VMware."
-		exit 2
-	fi
-	
-	# Wait for VMware and OS to start
-	sleep $WAIT_START_TIME
-	
-	return 0
-}
-
-stop_vmware() {
-	# shutdown is added to /etc/sudoers so no password is required
-	# /etc/sudoers entry: ailabc ALL=NOPASSWD:/sbin/shutdown -h now
-	ssh ailabc@$IP_ADDRESS "sudo /sbin/shutdown -h now > /dev/null"
-	
-	# Wait for OS to stop
-	sleep $WAIT_STOP_TIME
-	
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] Have to force shutdown."
-		# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-		"$VMRUN" stop "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-		ps=("${PIPESTATUS[@]}")
-		# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-		if ((${ps[0]})); then
-			echo "[$NAME] Could not stop VMware."
-			exit 3
-		fi
-	fi
-	
-	return 0
-}
-
-start_vmware
-
-# Check if autologin was successful
-for LOGGED_IN in {1..$RETRIES}; do
-	if ssh ailabc@$IP_ADDRESS "who | grep -q console"; then
-		# Autologin was successful
-		break
-	fi
-	
-	stop_vmware
-	
-	# Wait for VMware to stop
-	sleep $WAIT_RESTART_TIME
-	
-	start_vmware
-done
-
-if ! ssh ailabc@$IP_ADDRESS "who | grep -q console"; then
-	# Autologin was not successful after few retries, give up
-	echo "[$NAME] Could not autologin."
-	stop_vmware
-	exit 4
-fi
-
-# We run it twice so that we also use maybe updated "update-all-scripts.sh" script
-ssh ailabc@$IP_ADDRESS "/Users/ailabc/update-all-scripts.sh"
-ssh ailabc@$IP_ADDRESS "/Users/ailabc/update-all-scripts.sh"
-
-if [ $BUNDLE_ONLY ]; then
-	# dailyrun-bundleonly.sh is added to /etc/sudoers so no password is required
-	# /etc/sudoers entry: ailabc ALL=NOPASSWD:/Users/ailabc/dailyrun-bundleonly.sh
-	# WARNING: This is generally insecure as an attacker could change dailyrun-bundleonly.sh file and ...
-	#          but we are using it in a VMware which is used only for this script, so ...
-	ssh ailabc@$IP_ADDRESS "sudo /Users/ailabc/dailyrun-bundleonly.sh"
-else
-	# dailyrun.sh is added to /etc/sudoers so no password is required
-	# /etc/sudoers entry: ailabc ALL=NOPASSWD:/Users/ailabc/dailyrun.sh
-	# WARNING: This is generally insecure as an attacker could change dailyrun.sh file and ...
-	#          but we are using it in a VMware which is used only for this script, so ...
-	ssh ailabc@$IP_ADDRESS "sudo /Users/ailabc/dailyrun.sh"
-fi
-
-stop_vmware

install-scripts/vmware/vmware-dailyrun-macosx-6.sh

-#!/bin/bash
-#
-# Should be run as: ./wmvare-dailyrun-macosx-6.sh
-#
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-VMIMAGE='/Volumes/Data/vmware/Mac OS X Server 10.6 64-bit.vmwarevm/Mac OS X Server 10.6 64-bit.vmx'
-WAIT_START_TIME=300
-WAIT_STOP_TIME=600
-WAIT_RESTART_TIME=120
-RETRIES=5
-IP_ADDRESS='172.16.213.101'
-NAME='Mac OS X 10.6'
-
-# We use public/private keys SSH authentication so no need for a password
-
-start_vmware() {
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] VMware is already running."
-		exit 1
-	fi
-	
-	# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-	"$VMRUN" start "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure'
-	ps=("${PIPESTATUS[@]}")
-	# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-	if ((${ps[0]})); then
-		echo "[$NAME] Could not start VMware."
-		exit 2
-	fi
-	
-	# Wait for VMware and OS to start
-	sleep $WAIT_START_TIME
-	
-	return 0
-}
-
-stop_vmware() {
-	# shutdown is added to /etc/sudoers so no password is required
-	# /etc/sudoers entry: ailabc ALL=NOPASSWD:/sbin/shutdown -h now
-	ssh ailabc@$IP_ADDRESS "sudo /sbin/shutdown -h now > /dev/null"
-	
-	# Wait for OS to stop
-	sleep $WAIT_STOP_TIME
-	
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] Have to force shutdown."
-		# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-		"$VMRUN" stop "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-		ps=("${PIPESTATUS[@]}")
-		# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-		if ((${ps[0]})); then
-			echo "[$NAME] Could not stop VMware."
-			exit 3
-		fi
-	fi
-	
-	return 0
-}
-
-start_vmware
-
-# Check if autologin was successful
-for LOGGED_IN in {1..$RETRIES}; do
-	if ssh ailabc@$IP_ADDRESS "who | grep -q console"; then
-		# Autologin was successful
-		break
-	fi
-	
-	stop_vmware
-	
-	# Wait for VMware to stop
-	sleep $WAIT_RESTART_TIME
-	
-	start_vmware
-done
-
-if ! ssh ailabc@$IP_ADDRESS "who | grep -q console"; then
-	# Autologin was not successful after few retries, give up
-	echo "[$NAME] Could not autologin."
-	stop_vmware
-	exit 4
-fi
-
-# We run it twice so that we also use maybe updated "update-all-scripts.sh" script
-ssh ailabc@$IP_ADDRESS "/Users/ailabc/update-all-scripts.sh"
-ssh ailabc@$IP_ADDRESS "/Users/ailabc/update-all-scripts.sh"
-
-# dailyrun-finkonly.sh is added to /etc/sudoers so no password is required
-# /etc/sudoers entry: ailabc ALL=NOPASSWD:/Users/ailabc/dailyrun-finkonly.sh
-# WARNING: This is generally insecure as an attacker could change dailyrun-finkonly.sh file and ...
-#          but we are using it in a VMware which is used only for this script, so ...
-#ssh ailabc@$IP_ADDRESS "sudo /Users/ailabc/dailyrun-finkonly.sh"
-
-stop_vmware

install-scripts/vmware/vmware-dailyrun-winxp.sh

-#!/bin/bash -e
-#
-# Should be run as: ./wmvare-dailyrun-winxp.sh
-#
-
-# First mount the download@biolab.si share
-./mount-download.sh
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-VMIMAGE='/Volumes/Data/vmware/winXP.dailyBuild/winXP.dailyBuild.vmx'
-WAIT_TIME=3600
-NAME='Windows XP'
-
-# Sets error handler
-trap "echo \"Script failed\"" ERR
-
-start_vmware() {
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] VMware is already running."
-		exit 1
-	fi
-	
-	# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-	"$VMRUN" start "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-	# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-	# (which would be otherwise checked because of the -e switch, with true at the end of the pipe we ignore it)
-	if ((${PIPESTATUS[0]})); then false; fi
-
-	return 0
-}
-
-stop_vmware() {
-	# Wait for VMware and OS to start
-	sleep $WAIT_TIME
-	
-	if "$VMRUN" list | grep -q "$VMIMAGE"; then
-		echo "[$NAME] Had to force shutdown."
-		# We hide some Mac OS X warnings which happen if nobody is logged into a host Mac OS X
-		"$VMRUN" stop "$VMIMAGE" nogui 2>&1 | grep -i -v 'Untrusted apps are not allowed to connect to or launch Window Server before login' | grep -i -v 'FAILED TO establish the default connection to the WindowServer' | grep -i -v 'kCGErrorFailure' | true
-		# PIPESTATUS check is needed so that we test return value of the VMRUN and not grep
-		# (which would be otherwise checked because of the -e switch, with true at the end of the pipe we ignore it)
-		if ((${PIPESTATUS[0]})); then false; fi
-	fi
-	
-	return 0
-}
-
-start_vmware
-#stop_vmware

install-scripts/vmware/vmware-status.sh

-#!/bin/bash -e
-#
-# Should be run as: ./vmware-status.sh
-#
-
-VMRUN='/Library/Application Support/VMware Fusion/vmrun'
-
-# Sets error handler
-trap "echo \"Script failed\"" ERR
-
-"$VMRUN" list
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.