Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# Set errors to bail out.
set -e
# Display commands
#set -v
# Try to purge babel absolute temp directory for reruns and other users. See
trap "rm -Rf /tmp/babel" EXIT
rm -Rf "${BASE_DIR}" "${BABEL_CFG}"
if test -d "${BASE_DIR}"; then
echo "Could not purge $BASE_DIR"
exit 1
mkdir -p "${TEST_DIR}"
echo "Downloading Nimrod compiler 'devel'…"
git clone -q --depth 1 -b devel git:// "${NIM_DIR}"
git clone -q --depth 1 -b master git:// "${NIM_DIR}/csources"
echo "Compiling csources (master)…"
cd "${NIM_DIR}/csources"
sh 2>&1 >/dev/null
echo "Compiling koch…"
cd "${NIM_DIR}"
bin/nimrod c koch 2>&1 >/dev/null
echo "Compiling Nimrod…"
./koch boot -d:release 2>&1 >/dev/null
echo "Testing Nimrod compiler invokation through adhoc path…"
export PATH="${NIM_DIR}/bin:${PATH}"
which nimrod
nimrod -v|grep "Nimrod Compiler Version"
echo "Downloading Babel package manager…"
git clone -q --depth 1 "${BABEL_SRC}"
cd "${BABEL_SRC}"
echo "Compiling Babel…"
nimrod c -r src/babel install 2>&1 >/dev/null
echo "Installing Babel itself through environment path…"
export PATH="${BABEL_BIN}:${PATH}"
babel update 2>&1 >/dev/null
babel install -y babel 2>&1 >/dev/null
babel update
babel install argument_parser
babel install dropbox_filename_sanitizer
echo "Testing installed binary version."
dropbox_filename_sanitizer -v | grep "0.4.0"
echo "Test script finished successfully, removing stuff…"
rm -Rf "${BASE_DIR}" "${BABEL_CFG}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment