Skip to content

Commit

Permalink
Add version command
Browse files Browse the repository at this point in the history
Resolve #84
  • Loading branch information
fushar committed Nov 11, 2016
1 parent c2cb25f commit da550f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/tcframe
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ print_usage() {
echo "usage: tcframe <command>"
echo
echo "Available commands:"
echo -e " build\t\tCompile spec file into runner program"
echo " build Compile spec file into runner program"
echo " version Print tcframe version"
}

build() {
Expand All @@ -19,6 +20,10 @@ build() {
g++ -std=c++11 -D__TCFRAME_SPEC_FILE__="\"$SPEC_FILE\"" -I "$TCFRAME_HOME/include" -o $RUNNER_EXEC "$TCFRAME_HOME/src/tcframe/runner.cpp"
}

version() {
echo "tcframe 1.0.0"
}

if [ -z "$TCFRAME_HOME" ]; then
echo "tcframe: error: env variable TCFRAME_HOME not set"
exit 1
Expand All @@ -33,6 +38,8 @@ command=$1

if [ $1 = "build" ]; then
build
elif [ $1 = "version" ]; then
version
else
print_usage
exit 1
Expand Down

0 comments on commit da550f9

Please sign in to comment.