1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

added new wrapper to start S2SS tools

example:

$ s2ss server /etc/test.conf
This commit is contained in:
Steffen Vogel 2015-12-09 15:40:38 +01:00
parent 2d2699e967
commit d49c51c9ef
3 changed files with 40 additions and 3 deletions

2
.gitignore vendored
View file

@ -7,3 +7,5 @@ server
pipe
test
random
thirdparty/

View file

@ -87,12 +87,13 @@ libs2ss.so: $(LIB_OBJS)
$(CC) $(LIB_LDFLAGS) $(LIB_LDLIBS) -shared -o $@ $^
# Common targets
install: $(TARGETS)
install: $(TARGETS) $(LIBS)
install -m 0644 libs2ss.so $(PREFIX)/lib
install -m 0755 server -T $(PREFIX)/bin/s2ss
install -m 0755 server -T $(PREFIX)/bin/s2ss-server
install -m 0755 random $(PREFIX)/bin/s2ss-random
install -m 0755 pipe $(PREFIX)/bin/s2ss-pipe
install -m 0755 signal $(PREFIX)/bin/s2ss-signal
install -m 0755 test $(PREFIX)/bin/s2ss-test
install -m 0755 tools/s2ss.sh $(PREFIX)/bin/s2ss
release: all
tar czf s2ss-$(COMMIT)-docs.tar.gz documentation/html/

34
tools/s2ss.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
# Wrapper to start tool of the S2SS suite
#
# This allows you to use S2SS tools like this:
# $ s2ss server /etc/cosima/test.cfg
#
# Install by:
# $ make install
#
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
# @copyright 2014-2015, Institute for Automation of Complex Power Systems, EONERC
# This file is part of S2SS. All Rights Reserved. Proprietary and confidential.
# Unauthorized copying of this file, via any medium is strictly prohibited.
#
##################################################################################
PREFIX=s2ss
# Get a list of all available tools
TOOLS=$(compgen -c | egrep "^$PREFIX-" | sort | cut -d- -f2 | paste -sd\|)
# First argument to wrapper is the tool which should be started
TOOL=$1
# Following arguments will be passed directly to tool
ARGS=${@:2}
# Check if tool is available
if ! [[ "$TOOL" =~ $(echo ^\($TOOLS\)$) ]]; then
echo "Usage s2ss ($TOOLS)" 1>&2
exit 1
fi
exec $PREFIX-$TOOL $ARGS