Last active
August 29, 2015 14:24
-
-
Save rotty3000/6aef210cef56bd8e19fe to your computer and use it in GitHub Desktop.
Build equinox osgi, services, http.servlet, and run http.servlet.tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
checkoutMasterSubmodule() { | |
( | |
local name=${1##*/} | |
echo "[----> Initing Submodule '${name}']" | |
git submodule update "${name}" 2>/dev/null | |
cd "${name}" | |
git checkout master 2>/dev/null | |
)& | |
spin $! | |
} | |
clone_and_init() { | |
repo_dir=${1##*/} | |
repo_dir=${repo_dir%.git} | |
( | |
echo "[----> Cloning '${repo_dir}']" | |
git clone -b master --progress "$1" 2>/dev/null | |
cd ${repo_dir} | |
git submodule init 2>/dev/null | |
)& | |
spin $! | |
} | |
install() { | |
( | |
echo "[----> Installing '${1##*/}']" | |
cd "$1" | |
mvn -N install > /dev/null 2>&1 | |
)& | |
spin $! | |
} | |
integrationTest() { | |
( | |
echo "[----> Integration Testing '${1##*/}']" | |
cd "$1" | |
mvn integration-test -DskipTests=false | |
) | |
} | |
spin() { | |
local s=("|" "/" "-" '\x5C') | |
local i=0 | |
while kill -0 $1 2> /dev/null; do | |
echo -en "[${s[$i]}]"\\r | |
i=$(( $i == 3 ? 0 : $i + 1 )) | |
sleep .1 | |
done | |
} | |
START=$(date +%s.%N) | |
# (optional) Save this in your .profile or .bashrc for reuse, speeds up the build | |
export MAVEN_OPTS="-Xmx2048m -Declipse.p2.mirrors=false" | |
clone_and_init "git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git" | |
cd "${repo_dir}" | |
checkoutMasterSubmodule "eclipse.platform.runtime" | |
checkoutMasterSubmodule "rt.equinox.framework" | |
checkoutMasterSubmodule "rt.equinox.bundles" | |
install "eclipse-platform-parent" | |
install "eclipse.platform.releng.prereqs.sdk" | |
install "rt.equinox.framework" | |
install "rt.equinox.framework/bundles/org.eclipse.osgi" | |
install "rt.equinox.framework/bundles/org.eclipse.osgi.services" | |
install "rt.equinox.framework/bundles/org.eclipse.equinox.launcher" | |
install "rt.equinox.bundles" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.util" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.ds" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.http.jetty9" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.common" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.registry" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.app" | |
install "rt.equinox.bundles/bundles/org.eclipse.equinox.preferences" | |
install "eclipse.platform.runtime" | |
install "eclipse.platform.runtime/bundles/org.eclipse.core.jobs" | |
install "eclipse.platform.runtime/bundles/org.eclipse.core.contenttype" | |
install "eclipse.platform.runtime/bundles/org.eclipse.core.runtime" | |
integrationTest "rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet.tests" | |
END=$(date +%s.%N) | |
DIFF=$(bc -l <<< "scale=3; ($END - $START)") | |
echo "[----> Build Time: ${DIFF} s]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment