summarylogtreecommitdiffstats
path: root/waifu2x-ncnn-vulkan
blob: 54c37f6f4e6eed776d0b4f5dc9ebbdec0dc2503c (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
26
27
28
29
30
31
#!/bin/sh

default_model_path="/usr/share/waifu2x-ncnn-vulkan/"
readonly default_model_path

args=""

while getopts "hvi:o:n:s:t:m:g:j:xf:" arg; do
    case $arg in
    h) args="$args -$arg" ;;
    v) args="$args -$arg" ;;
    i) args="$args -$arg $OPTARG" ;;
    o) args="$args -$arg $OPTARG" ;;
    n) args="$args -$arg $OPTARG" ;;
    s) args="$args -$arg $OPTARG" ;;
    t) args="$args -$arg $OPTARG" ;;
    m)
        if ! [ -d $OPTARG ]; then
            args="$args -m $default_model_path$OPTARG"
        else
            args="$args -$arg $OPTARG"
        fi
        ;;
    g) args="$args -$arg $OPTARG" ;;
    j) args="$args -$arg $OPTARG" ;;
    x) args="$args -$arg" ;;
    f) args="$args -$arg $OPTARG" ;;
    esac
done

/usr/share/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan $args