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

Commit

Permalink
Update gridlabd-version (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
David P. Chassin authored Nov 2, 2021
1 parent 5492e86 commit 4c49a84
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gldcore/scripts/gridlabd-version
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ function error()
exit $RC
}

function warning()
{
echo "WARNING [$EXE] $*" > /dev/stderr
}

case "$1" in
--dryrun)
ACTION="echo"
Expand Down Expand Up @@ -49,8 +54,8 @@ function version-check()
branch=$(${BIN} --version=git-branch)
remote=$( (curl -sL "https://raw.githubusercontent.com/slacgismo/gridlabd/$branch/gldcore/version.h" | grep '#define REV_' | cut -f3 -d' ' | tr '\n' . | cut -f-3 -d.) || echo "none" )
if [ "$remote" == "none" -o -z "$remote" ]; then
[ "$1" != "-q" -a "$1" != "-w" ] && error 2 "$version ($branch) remote not found"
[ "$1" != "-q" ] && warning "$version ($branch) remote not found"
[ "$1" != "-q" -a "$1" != "-w" ] && error 2 "$version ($branch) branch not found on github"
[ "$1" != "-q" ] && warning "$version ($branch) branch not found on github"
exit 0
fi
[ "$1" == "-v" ] && echo "REMOTE/$branch $remote"
Expand Down

0 comments on commit 4c49a84

Please sign in to comment.