Commit 8c465707 authored by Maxime Perrotin's avatar Maxime Perrotin
parents 2111c73c d74bb12f
...@@ -2,14 +2,18 @@ ...@@ -2,14 +2,18 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "${DIR}/common.sh" . "${DIR}/common.sh"
function overWriteAADLcomponents()
{
# Install Maxime's customized version of available deployment targets
echo Installing customized version of available deployment targets...
cat ../misc/supported-platforms/ocarina_components.aadl | \
sed "s,/home/taste/tool-inst,$(taste-config --prefix)," > \
"${PREFIX}/share/ocarina/AADLv2/ocarina_components.aadl"
}
# Setup the tools in ~/.local/bin # Setup the tools in ~/.local/bin
cd "$DIR/../ocarina" || exit 1 cd "$DIR/../ocarina" || exit 1
# Install Maxime's customized version of available deployment targets
cat ../misc/supported-platforms/ocarina_components.aadl | \
sed "s,/home/taste/tool-inst,$(taste-config --prefix)," > \
${PREFIX}/share/ocarina/AADLv2/ocarina_components.aadl
# Skip Ocarina building if tree is clean and version is identical # Skip Ocarina building if tree is clean and version is identical
HEAD="$(git log --oneline | head -1 | cut -d' ' -f1)" HEAD="$(git log --oneline | head -1 | cut -d' ' -f1)"
VERSION_INSTALLED="$(ocarina -v 2>&1 | grep ^Oca | awk '{print $NF}' | sed 's,),,;s,r,,')" VERSION_INSTALLED="$(ocarina -v 2>&1 | grep ^Oca | awk '{print $NF}' | sed 's,),,;s,r,,')"
...@@ -21,6 +25,7 @@ else ...@@ -21,6 +25,7 @@ else
fi fi
if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then if [ ${TREE_DIRTY} -eq 0 ] && [ "${HEAD}" == "${VERSION_INSTALLED}" ] ; then
echo Ocarina tree is clean and already installed. Skipping Ocarina build... echo Ocarina tree is clean and already installed. Skipping Ocarina build...
overWriteAADLcomponents
exit 0 exit 0
fi fi
...@@ -30,6 +35,8 @@ make distclean # ignore any errors here ...@@ -30,6 +35,8 @@ make distclean # ignore any errors here
make || exit 1 make || exit 1
make install make install
overWriteAADLcomponents
# Add Ocarina to PATH # Add Ocarina to PATH
PATH_CMD='export PATH=$PATH:'"${PREFIX}/bin" PATH_CMD='export PATH=$PATH:'"${PREFIX}/bin"
UpdatePATH UpdatePATH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment