-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework demos building and installation
* add `ltc` wrapper script for installed demos * rework demos/CMakeLists.txt and add some more bells and whistles * prefix installed demos with `ltc-` Currently this makes the standard makefiles and CMake results diverge, but we can fix that later if required. Signed-off-by: Steffen Jaeckel <[email protected]>
- Loading branch information
Showing
9 changed files
with
109 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ doc/crypt.pdf | |
doc/refman.pdf | ||
|
||
# *nix/windows test executables | ||
ltc-* | ||
aesgcm | ||
aesgcm.exe | ||
constants | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
RELDIR="/$0" | ||
RELDIR="${RELDIR%/*}" | ||
RELDIR="${RELDIR:-.}" | ||
RELDIR="${RELDIR##/}/" | ||
|
||
BINDIR=`cd "$RELDIR"; pwd` | ||
|
||
err_out() { | ||
err=$1 | ||
shift | ||
echo $* >&2 | ||
exit $err | ||
} | ||
|
||
usage() { | ||
cat >&$(($1 + 1)) << EOF | ||
Available commands are: | ||
`ls -1 $BINDIR/ltc-* | sed "s@$BINDIR/ltc-@ @g"` | ||
help | ||
EOF | ||
exit $1 | ||
} | ||
|
||
[ $# -gt 0 ] || usage 1 | ||
|
||
TOOL="$1" | ||
shift | ||
[ "$TOOL" == "help" ] || [ "$TOOL" == "--help" ] || [ "$TOOL" == "-h" ] && usage 0 | ||
|
||
test -x "$BINDIR/ltc-$TOOL" || err_out 1 "Unknown command: $TOOL" | ||
|
||
[ $# -gt 0 ] && "$BINDIR/ltc-$TOOL" "$@" || "$BINDIR/ltc-$TOOL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters