#!/bin/bash
# Short alias for `openwhisper`. Delegates to the main launcher in the same
# folder so all logic stays in one place.

resolve_script_dir() {
    local source="${BASH_SOURCE[0]}"
    local dir

    while [ -L "$source" ]; do
        dir="$(cd -P "$(dirname "$source")" && pwd)"
        source="$(readlink "$source")"
        if [[ "$source" != /* ]]; then
            source="$dir/$source"
        fi
    done

    cd -P "$(dirname "$source")" && pwd
}

SCRIPT_DIR="$(resolve_script_dir)"
exec "$SCRIPT_DIR/openwhisper" "$@"
