aboutsummaryrefslogtreecommitdiff
path: root/operators/command_authorize.zsh
blob: 41c8ecdd267c9deadd5176fef714f0c42f557f94 (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
32
33
34
35
36
37
38
39
# Copyright (C) 2024-2026 Maria Lisina
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0

if [[ -n "${1}" ]]
then
    ib_board="${1}"
    source "${units}/ib_config.zsh"

    if [[ -z "${ib_auth}" ]]
    then
        output_text="Unsupported Image Board"
        return
    fi

    shift
else
    output_text="You must specify Image Board"
    return
fi

if [[ -n "${1}" ]]
then
    ib_login="${1}"
    shift
fi

if [[ -n "${1}" ]]
then
    ib_key="${1}"
    shift
fi

source "${units}/ib_lock.zsh"

if [[ -z "${output_text}" ]]
then
    output_text="Authorized successfully"
fi