-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathview-review
More file actions
executable file
·71 lines (54 loc) · 1.35 KB
/
view-review
File metadata and controls
executable file
·71 lines (54 loc) · 1.35 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Copyright (c) 2025 Logic Magicians Software.
# All Rights Reserved.
# Licensed under Gnu GPL V3.
#
# This wrapper script facilitates invoking the self-review Python
# script.
#
set -o errexit;
set -o nounset;
set -o pipefail;
SCRIPT="${BASH_SOURCE[0]}"
SCRIPT_DIR=$(dirname "${SCRIPT}");
function readlinkf ()
{
local pn="${1}";
local sourced="0"; # False
if [[ "${pn}" != /* ]]; then
${pn}="$(pwd)/${pn}";
fi
while [ -L "${pn}" ]; do
${pn}=$(ls -l "${pn}" | sed 's/.*-> //');
if [[ "${pn}" != /* ]]; then
${pn}="$(dirname "$1")/${pn}";
fi;
done;
echo "$(cd "$(dirname "${pn}")" && pwd)/$(basename "${pn}")";
}
function fatal ()
{
local msg="${1}";
echo "fatal: ${msg}";
exit 10;
}
function main()
{
local python=$(which python3);
local options="-b -B -E";
local vr="$(readlinkf ${SCRIPT_DIR}/scripts.d/vr.d/vr.py)";
if [ -z "${python}" ] ; then
cat <<EOF
No Python 3 interpreter was found on the path.
Put a Python 3 interpreter on the path to execute this tool.
EOF
fatal "No Python 3 interpreter on \${PATH}.";
fi;
if [ -r "${vr}" ] ; then
export QT_LOGGING_RULES="qt.xkb.compose=false";
exec ${python} ${options} "${vr}" "$@";
else
fatal "Unable to read '${vr}'";
fi;
}
main $@;