Skip to content

Instantly share code, notes, and snippets.

@jxson
Last active July 6, 2018 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jxson/1061e514cf6eda8b4464a197778e8ebf to your computer and use it in GitHub Desktop.
Save jxson/1061e514cf6eda8b4464a197778e8ebf to your computer and use it in GitHub Desktop.

README

An experiment to validate the jiri run hook environment.

#!/bin/bash
pushd `dirname $0` > /dev/null
CURRENT_DIRECTORY=`pwd -P`
popd > /dev/null
pushd "$CURRENT_DIRECTORY/.." > /dev/null
EXPECTED=`pwd -P`
popd > /dev/null
echo "CURRENT_DIRECTORY: ${CURRENT_DIRECTORY}"
echo "EXPECTED: ${EXPECTED}"
echo "JIRI_ROOT: ${JIRI_ROOT}"
if [ "${JIRI_ROOT}" != "${EXPECTED}" ]; then
echo ""
echo "Expected \$JIRI_ROOT "${JIRI_ROOT}" to equal: ${EXPECTED}"
echo ""
exit 1
fi
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<projects>
<project name="validator"
path="validator"
remote="https://gist.github.com/1061e514cf6eda8b4464a197778e8ebf.git"
runhook="validator/hook.sh"/>
</projects>
</manifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment