Skip to content

Commit

Permalink
<req> Add usage information to VIBuildProject.sh
Browse files Browse the repository at this point in the history
<rev> Update Requirements for VIBuildProject
<priv> Update Usage for correct markdown formatting
  • Loading branch information
wireddown committed Nov 28, 2014
1 parent 2f24996 commit d5d77f7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Tools for VIs

>```
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj'
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj' --target "VIKit.dll@My Computer"
>
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj' --target 'VIKit.dll@My Computer'
>
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj' --lv-version 2014
```
Expand All @@ -26,7 +26,7 @@ My Computer VIKit.dll DLL
>```
$ VIQueryVersion.exe 'C:\path\to\VIQueryVersion.vi'
13.0
>
$ VIQueryVersion.exe 'C:\path\to\VIKit.lvproj'
13.0
```
Expand Down Expand Up @@ -58,4 +58,5 @@ Requirements

* Windows XP or later
* [LabVIEW 2013 Run-Time Engine](http://www.ni.com/download/labview-run-time-engine-2013-sp1/4539/en/)
* `VIBuildProject.sh` requires a LabVIEW IDE with [Application Builder](http://sine.ni.com/nips/cds/view/p/lang/en/nid/210593)

1 change: 1 addition & 0 deletions documentation/Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Requirements

* Windows XP or later
* [LabVIEW 2013 Run-Time Engine](http://www.ni.com/download/labview-run-time-engine-2013-sp1/4539/en/)
* `VIBuildProject.sh` requires a LabVIEW IDE with [Application Builder](http://sine.ni.com/nips/cds/view/p/lang/en/nid/210593)

8 changes: 4 additions & 4 deletions documentation/UsageSynopsis.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Tools for VIs

>```
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj'
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj' --target "VIKit.dll@My Computer"
>
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj' --target 'VIKit.dll@My Computer'
>
$ VIBuildProject.sh --project 'C:\path\to\VIKit.lvproj' --lv-version 2014
```
Expand All @@ -23,7 +23,7 @@ My Computer VIKit.dll DLL
>```
$ VIQueryVersion.exe 'C:\path\to\VIQueryVersion.vi'
13.0
>
$ VIQueryVersion.exe 'C:\path\to\VIKit.lvproj'
13.0
```
Expand Down
14 changes: 14 additions & 0 deletions source/bash/VIBuildProject.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
#
# Copyright 2014 Joe Friedrichsen
# Licensed under the Apache License, Version 2.0

set -e

# sed RegEx to replace / with \ in a path
Expand All @@ -23,6 +27,15 @@ function ToBashPath
echo "$1" | sed -e "${ToBashRoot}" | sed -e "${ToBashSeparators}"
}

function PrintUsage
{
echo >&2 "Usage:"
echo >&2 " VIBuildProject.sh --project 'c:\path\to\project.lvproj' [--target 'SpecName@TargetName'] [--lv-version VersionYear]"
echo >&2
echo >&2 "To find buildable targets for the --target option, use \"VIQueryBuildSpecs c:\path\to\project.lvproj\""
echo >&2
}

function ExitWithError
{
echo >&2 "ERROR: $1"
Expand Down Expand Up @@ -184,6 +197,7 @@ while test $# -gt 1; do
done

if test -z "${ProjectPath}"; then
PrintUsage
ExitWithError "argument '--project c:\path\to\project.lvproj' is required."
fi

Expand Down

0 comments on commit d5d77f7

Please sign in to comment.