Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Develop fix version check (#1071)
Browse files Browse the repository at this point in the history
* Update gridlabd-version

* Update gridlabd-version

* Update gridlabd-version

* Removing redundant requirement

Co-authored-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
  • Loading branch information
David P. Chassin and aivanova5 authored Jan 13, 2022
1 parent 005010f commit e1da993
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gldcore/scripts/gridlabd-version
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function version-check()
exit 0
fi
[ "$1" == "-v" ] && echo "REMOTE/$branch $remote"
${BIN} --version="-ge $remote" 2>/dev/null || ( ( [ "$1" != "-q" ] && error 1 "$version ($branch) is outdated" ) ; exit 1 )
${BIN} --version="-ge $remote" 2>/dev/null || ( ( [ "$1" != "-q" -a "$1" != "-w" ] && warning "$version ($branch) is outdated" ) ; exit 0 )
[ "$1" != "-q" -a "$1" != "-w" ] && echo "$version ($branch) is ok"
[ "$1" == "-w" ] && ( curl -sL "http://version.gridlabd.us/index.html?v=${version}&b=${branch}" >/dev/null & )
exit 0
Expand Down Expand Up @@ -193,3 +193,11 @@ if [ "$(type -t version-$1)" == "function" ]; then
else
error 9 "'$1' is not a valid command"
fi

if [ -z "$(which gridlabd)" ]; then
warning "gridlabd is not in the current PATH environment"
fi
if [ ! -x "/usr/local/bin/python3" ]; then
warning "python3 is not linked where gridlabd wants it in /usr/local/bin"
fi

0 comments on commit e1da993

Please sign in to comment.