Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
taste-setup
Commits
fc4fbcbf
Commit
fc4fbcbf
authored
Feb 21, 2017
by
Thanassis Tsiodras
Browse files
Skip DMT install if tree is clean and identical version is already installed.
parent
e0727122
Changes
1
Hide whitespace changes
Inline
Side-by-side
install/10_dmt.sh
View file @
fc4fbcbf
...
...
@@ -4,6 +4,17 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Setup the tools in ~/.local/bin
cd
$DIR
/../dmt
||
exit
1
# Skip install if the version installed is the same and the tree is clean
HEAD
=
"
$(
grep
version
=
setup.py |
awk
-F
\"
'{print $2}'
)
"
VERSION_INSTALLED
=
"
$(
dmt
--version
2>/dev/null |
grep
^TAST |
awk
'{print $NF}'
)
"
git status
>
/dev/null
TREE_CLEAN
=
$?
if
[
${
TREE_CLEAN
}
-eq
0
-a
"
${
HEAD
}
"
==
"
${
VERSION_INSTALLED
}
"
]
;
then
echo
DMT tree is clean and already installed. Skipping DMT install...
exit
0
fi
pip3
install
--user
--upgrade
.
||
exit
1
# Add .local/bin to PATH
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment