summarylogtreecommitdiffstats
path: root/launcher.sh
blob: 7d6e9511590c0a36a7ba0b6ea107da9615325f96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash

#set -o xtrace
set -o errexit -o nounset -o pipefail -o errtrace
IFS=$'\n\t'

if [[ $0 == *rgb ]] ; then
    color=rgb
elif [[ $0 == *mono ]] ; then
    color=mono
else
    exit 1
fi

src=${1:-}
src=$(readlink -f "$src")
dst=${2:-}
if [ -n "$dst" ] ; then
    dst=$(readlink -f "$dst")
fi
stride=${3:-}

cd /usr/lib/__PKGNAME__/

./${color}_starnet++ "$src" "$dst" $stride