summarylogtreecommitdiffstats
path: root/tsac
blob: 8e6df7b86aea841ba07cf2d781cc162c4884130c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash

if [[ $# -ge 3 && $1 != "--help" && $1 != "-h" ]]; then
    input_file=$(realpath "${@:$#-1:1}")
    output_file=$(realpath "${!#}")
    other_args="${@:1:$#-2}"

    if [[ ! -f "$input_file" ]]; then
        echo "file \"$input_file\" not found..."
        exit 1
    fi

    cd /usr/share/tsac || exit 2
    /usr/lib/tsac/tsac $other_args "$input_file" "$output_file"
else
    cd /usr/share/tsac || exit 2
    /usr/lib/tsac/tsac "$@"
fi