karnel-termux 4.7.5 → 4.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -223,6 +223,9 @@ _list_dev() {
|
|
|
223
223
|
table_row "Shfmt" "--shfmt" "$(_check_pkg "shfmt")"
|
|
224
224
|
table_row "Make" "--make" "$(_check_pkg "make")"
|
|
225
225
|
table_row "Udocker" "--udocker" "$(_check_pkg "udocker")"
|
|
226
|
+
table_row "Snyk" "--snyk" "$(_check_cmd "snyk")"
|
|
227
|
+
table_row "httptmux" "--httptmux" "$(_check_cmd "httptmux")"
|
|
228
|
+
table_row "Zork" "--zork" "$(_check_cmd "zork")"
|
|
226
229
|
table_end
|
|
227
230
|
|
|
228
231
|
echo
|
|
@@ -6,10 +6,10 @@ import "@/utils/version"
|
|
|
6
6
|
LOG_FILE="$KARNEL_CACHE/install_dev.log"
|
|
7
7
|
ZORK_DATA_DIR="$HOME/.local/share/karnel-data/zork"
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
9
|
+
ZORK_URLS=(
|
|
10
|
+
"1:http://www.infocom-if.org/downloads/zork1.zip"
|
|
11
|
+
"2:http://www.infocom-if.org/downloads/zork2.zip"
|
|
12
|
+
"3:http://www.infocom-if.org/downloads/zork3.zip"
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
_install_zork_deps() {
|
|
@@ -23,6 +23,12 @@ _install_zork_deps_impl() {
|
|
|
23
23
|
return 1
|
|
24
24
|
fi
|
|
25
25
|
fi
|
|
26
|
+
if ! command -v unzip &>/dev/null; then
|
|
27
|
+
if ! pkg install unzip -y &>>"$LOG_FILE"; then
|
|
28
|
+
log_error "Failed to install unzip"
|
|
29
|
+
return 1
|
|
30
|
+
fi
|
|
31
|
+
fi
|
|
26
32
|
return 0
|
|
27
33
|
}
|
|
28
34
|
|
|
@@ -33,22 +39,27 @@ _download_zork_data() {
|
|
|
33
39
|
_download_zork_data_impl() {
|
|
34
40
|
mkdir -p "$ZORK_DATA_DIR"
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
for entry in "${ZORK_URLS[@]}"; do
|
|
43
|
+
local num="${entry%%:*}"
|
|
44
|
+
local url="${entry#*:}"
|
|
45
|
+
local zip_file="$ZORK_DATA_DIR/zork${num}.zip"
|
|
38
46
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
if [ -f "$ZORK_DATA_DIR/DATA/ZORK${num}.DAT" ]; then
|
|
48
|
+
continue
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
if ! curl -sSfL "$url" -o "$zip_file" 2>>"$LOG_FILE"; then
|
|
52
|
+
log_error "Failed to download Zork ${num}"
|
|
42
53
|
return 1
|
|
43
54
|
fi
|
|
44
55
|
|
|
45
|
-
if ! unzip -o "$zip_file" -d "$ZORK_DATA_DIR"
|
|
46
|
-
log_error "Failed to extract Zork
|
|
56
|
+
if ! unzip -o "$zip_file" -d "$ZORK_DATA_DIR" 2>>"$LOG_FILE"; then
|
|
57
|
+
log_error "Failed to extract Zork ${num}"
|
|
47
58
|
return 1
|
|
48
59
|
fi
|
|
49
60
|
|
|
50
61
|
rm -f "$zip_file"
|
|
51
|
-
|
|
62
|
+
done
|
|
52
63
|
|
|
53
64
|
return 0
|
|
54
65
|
}
|
package/karnel/utils/env.sh
CHANGED
package/package.json
CHANGED