Community maintained packages for ImmortalWrt.
Revision | 8d2d6c46d61dee6e5b909add58859cfc5a5875a1 (tree) |
---|---|
Time | 2022-12-03 04:19:21 |
Author | Stan Grishin <stangri@melm...> |
Commiter | GitHub |
Merge pull request #19993 from stangri/master-simple-adblock
simple-adblock: localizable error/warning messages
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk | ||
6 | 6 | |
7 | 7 | PKG_NAME:=simple-adblock |
8 | 8 | PKG_VERSION:=1.9.3 |
9 | -PKG_RELEASE:=2 | |
9 | +PKG_RELEASE:=3 | |
10 | 10 | PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca> |
11 | 11 | PKG_LICENSE:=GPL-3.0-or-later |
12 | 12 |
@@ -100,49 +100,60 @@ uci_changes() { | ||
100 | 100 | ipset() { "$ipset" "$@" >/dev/null 2>&1; } |
101 | 101 | nft() { "$nft" "$@" >/dev/null 2>&1; } |
102 | 102 | |
103 | -get_status_text() { | |
104 | - local _ret | |
103 | +get_text() { | |
104 | + local r | |
105 | 105 | case "$1" in |
106 | - statusNoInstall) _ret="$serviceName is not installed or not found";; | |
107 | - statusStopped) _ret="Stopped";; | |
108 | - statusStarting) _ret="Starting";; | |
109 | - statusRestarting) _ret="Restarting";; | |
110 | - statusForceReloading) _ret="Force Reloading";; | |
111 | - statusDownloading) _ret="Downloading";; | |
112 | - statusProcessing) _ret="Processing";; | |
113 | - statusError) _ret="Error";; | |
114 | - statusWarning) _ret="Warning";; | |
115 | - statusFail) _ret="Fail";; | |
116 | - statusSuccess) _ret="Success";; | |
117 | - esac | |
118 | - printf "%b" "$_ret" | |
119 | -} | |
120 | -get_error_text() { | |
121 | - local _ret | |
122 | - case "$1" in | |
123 | - errorOutputFileCreate) _ret="failed to create $outputFile file";; | |
124 | - errorFailDNSReload) _ret="failed to restart/reload DNS resolver";; | |
125 | - errorSharedMemory) _ret="failed to access shared memory";; | |
126 | - errorSorting) _ret="failed to sort data file";; | |
127 | - errorOptimization) _ret="failed to optimize data file";; | |
128 | - errorAllowListProcessing) _ret="failed to process allow-list";; | |
129 | - errorDataFileFormatting) _ret="failed to format data file";; | |
130 | - errorMovingDataFile) _ret="failed to move data file '${A_TMP}' to '${outputFile}'";; | |
131 | - errorCreatingCompressedCache) _ret="failed to create compressed cache";; | |
132 | - errorRemovingTempFiles) _ret="failed to remove temporary files";; | |
133 | - errorRestoreCompressedCache) _ret="failed to unpack compressed cache";; | |
134 | - errorRestoreCache) _ret="failed to move '$outputCache' to '$outputFile'";; | |
135 | - errorOhSnap) _ret="failed to create block-list or restart DNS resolver";; | |
136 | - errorStopping) _ret="failed to stop $serviceName";; | |
137 | - errorDNSReload) _ret="failed to reload/restart DNS resolver";; | |
138 | - errorDownloadingConfigUpdate) _ret="failed to download Config Update file";; | |
139 | - errorDownloadingList) _ret="failed to download";; | |
140 | - errorParsingConfigUpdate) _ret="failed to parse Config Update file";; | |
141 | - errorParsingList) _ret="failed to parse";; | |
142 | - errorNoSSLSupport) _ret="no HTTPS/SSL support on device";; | |
143 | - errorCreatingDirectory) _ret="failed to create output/cache/gzip file directory";; | |
106 | + errorConfigValidationFail) r="$packageName config validation failed";; | |
107 | + errorServiceDisabled) r="$packageName is currently disabled";; | |
108 | + errorNoDnsmasqIpset) | |
109 | + r="dnsmasq ipset support is enabled in $packageName, but dnsmasq is either not installed or installed dnsmasq does not support ipset";; | |
110 | + errorNoIpset) | |
111 | + r="dnsmasq ipset support is enabled in $packageName, but ipset is either not installed or installed ipset does not support 'hash:net' type";; | |
112 | + errorNoDnsmasqNftset) | |
113 | + r="dnsmasq nft set support is enabled in $packageName, but dnsmasq is either not installed or installed dnsmasq does not support nft set";; | |
114 | + errorNoNft) r="dnsmasq nft sets support is enabled in $packageName, but nft is not installed";; | |
115 | + errorMkdirFail) r="Unable to create directory for";; | |
116 | + errorNoWanGateway) r="The ${serviceName} service failed to discover WAN gateway!";; | |
117 | + errorOutputDirCreate) r="failed to create directory for %s file";; | |
118 | + errorOutputFileCreate) r="failed to create $outputFile file";; | |
119 | + errorFailDNSReload) r="failed to restart/reload DNS resolver";; | |
120 | + errorSharedMemory) r="failed to access shared memory";; | |
121 | + errorSorting) r="failed to sort data file";; | |
122 | + errorOptimization) r="failed to optimize data file";; | |
123 | + errorAllowListProcessing) r="failed to process allow-list";; | |
124 | + errorDataFileFormatting) r="failed to format data file";; | |
125 | + errorMovingDataFile) r="failed to move data file '${A_TMP}' to '${outputFile}'";; | |
126 | + errorCreatingCompressedCache) r="failed to create compressed cache";; | |
127 | + errorRemovingTempFiles) r="failed to remove temporary files";; | |
128 | + errorRestoreCompressedCache) r="failed to unpack compressed cache";; | |
129 | + errorRestoreCache) r="failed to move '$outputCache' to '$outputFile'";; | |
130 | + errorOhSnap) r="failed to create block-list or restart DNS resolver";; | |
131 | + errorStopping) r="failed to stop $serviceName";; | |
132 | + errorDNSReload) r="failed to reload/restart DNS resolver";; | |
133 | + errorDownloadingConfigUpdate) r="failed to download Config Update file";; | |
134 | + errorDownloadingList) r="failed to download";; | |
135 | + errorParsingConfigUpdate) r="failed to parse Config Update file";; | |
136 | + errorParsingList) r="failed to parse";; | |
137 | + errorNoSSLSupport) r="no HTTPS/SSL support on device";; | |
138 | + errorCreatingDirectory) r="failed to create output/cache/gzip file directory";; | |
139 | + | |
140 | + statusNoInstall) r="$serviceName is not installed or not found";; | |
141 | + statusStopped) r="Stopped";; | |
142 | + statusStarting) r="Starting";; | |
143 | + statusRestarting) r="Restarting";; | |
144 | + statusForceReloading) r="Force Reloading";; | |
145 | + statusDownloading) r="Downloading";; | |
146 | + statusProcessing) r="Processing";; | |
147 | + statusError) r="Error";; | |
148 | + statusWarning) r="Warning";; | |
149 | + statusFail) r="Fail";; | |
150 | + statusSuccess) r="Success";; | |
151 | + | |
152 | + warningExternalDnsmasqConfig) | |
153 | + r="use of external dnsmasq config file detected, please set 'dns' option to 'dnsmasq.conf'";; | |
154 | + warningMissingRecommendedPackages) r="Some recommended packages are missing";; | |
144 | 155 | esac |
145 | - printf "%b" "$_ret" | |
156 | + echo "$r" | |
146 | 157 | } |
147 | 158 | |
148 | 159 | output_ok() { output 1 "$_OK_"; output 2 "$__OK__\\n"; } |
@@ -187,13 +198,15 @@ load_environment() { | ||
187 | 198 | local validation_result="$1" quiet="$2" |
188 | 199 | |
189 | 200 | if [ "$validation_result" != '0' ]; then |
190 | - output "${_ERROR_}: $packageName config validation failed!\\n" | |
201 | + json add error "errorConfigValidationFail" | |
202 | + output "${_ERROR_}: $(get_text 'errorConfigValidationFail')!\\n" | |
191 | 203 | output "Please check if the '$packageConfigFile' contains correct values for config options.\\n" |
192 | 204 | return 1 |
193 | 205 | fi |
194 | 206 | |
195 | 207 | if [ "$enabled" -eq 0 ]; then |
196 | - output "$packageName is currently disabled.\\n" | |
208 | + json add error "errorServiceDisabled" | |
209 | + output "${_ERROR_}: $(get_text 'errorServiceDisabled')!\\n" | |
197 | 210 | output "Run the following commands before starting service again:\\n" |
198 | 211 | output "uci set ${packageName}.config.enabled='1'; uci commit $packageName;\\n" |
199 | 212 | return 1 |
@@ -210,7 +223,8 @@ load_environment() { | ||
210 | 223 | dnsmasq.conf) :;; |
211 | 224 | *) |
212 | 225 | if [ -z "$quiet" ]; then |
213 | - output "$_WARNING_: use of external dnsmasq config file detected, please set 'dns' option to 'dnsmasq.conf'!\\n" | |
226 | + json add warning "warningExternalDnsmasqConfig" | |
227 | + output "${_WARNING_}: $(get_text 'warningExternalDnsmasqConfig')!\\n" | |
214 | 228 | fi |
215 | 229 | ;; |
216 | 230 | esac |
@@ -230,13 +244,15 @@ load_environment() { | ||
230 | 244 | dnsmasq.ipset) |
231 | 245 | if dnsmasq -v 2>/dev/null | grep -q 'no-ipset' || ! dnsmasq -v 2>/dev/null | grep -q -w 'ipset'; then |
232 | 246 | if [ -z "$quiet" ]; then |
233 | - output "$_ERROR_: dnsmasq ipset support is enabled in $packageName, but dnsmasq is either not installed or installed dnsmasq does not support ipset!\\n" | |
247 | + json add error "errorNoDnsmasqIpset" | |
248 | + output "${_ERROR_}: $(get_text 'errorNoDnsmasqIpset')!\\n" | |
234 | 249 | fi |
235 | 250 | dns='dnsmasq.servers' |
236 | 251 | fi |
237 | 252 | if ! ipset help hash:net; then |
238 | 253 | if [ -z "$quiet" ]; then |
239 | - output "$_ERROR_: dnsmasq ipset support is enabled in $packageName, but ipset is either not installed or installed ipset does not support 'hash:net' type!\\n" | |
254 | + json add error "errorNoIpset" | |
255 | + output "${_ERROR_}: $(get_text 'errorNoIpset')!\\n" | |
240 | 256 | fi |
241 | 257 | dns='dnsmasq.servers' |
242 | 258 | fi |
@@ -244,13 +260,15 @@ load_environment() { | ||
244 | 260 | dnsmasq.nftset) |
245 | 261 | if dnsmasq -v 2>/dev/null | grep -q 'no-nftset' || ! dnsmasq -v 2>/dev/null | grep -q -w 'nftset'; then |
246 | 262 | if [ -z "$quiet" ]; then |
247 | - output "$_ERROR_: dnsmasq nft sets support is enabled in $packageName, but dnsmasq is either not installed or installed dnsmasq does not support nft sets!\\n" | |
263 | + json add error "errorNoDnsmasqNftset" | |
264 | + output "${_ERROR_}: $(get_text 'errorNoDnsmasqNftset')!\\n" | |
248 | 265 | fi |
249 | 266 | dns='dnsmasq.servers' |
250 | 267 | fi |
251 | 268 | if [ -z "$nft" ]; then |
252 | 269 | if [ -z "$quiet" ]; then |
253 | - output "$_ERROR_: dnsmasq nft sets support is enabled in $packageName, but nft is not installed!\\n" | |
270 | + json add error "errorNoNft" | |
271 | + output "${_ERROR_}: $(get_text 'errorNoNft')!\\n" | |
254 | 272 | fi |
255 | 273 | dns='dnsmasq.servers' |
256 | 274 | fi |
@@ -335,8 +353,8 @@ load_environment() { | ||
335 | 353 | |
336 | 354 | for i in "$outputFile" "$outputCache" "$outputGzip"; do |
337 | 355 | if ! mkdir -p "$(dirname "$i")"; then |
338 | - output "$_ERROR_: Unable to create directory for $i!\\n" | |
339 | - json add error "errorOutputFileCreate" | |
356 | + json add error "errorOutputDirCreate" "$i" | |
357 | + output "${_ERROR_}: $(get_text 'errorMkdirFail' "$i")!\\n" | |
340 | 358 | fi |
341 | 359 | done |
342 | 360 |
@@ -352,7 +370,8 @@ load_environment() { | ||
352 | 370 | is_present '/usr/libexec/sed-gnu' || s="$s sed" |
353 | 371 | is_present '/usr/libexec/sort-coreutils' || s="$s coreutils-sort" |
354 | 372 | if [ -z "$quiet" ]; then |
355 | - output "$_WARNING_: Some recommended packages are missing, install them by running:\\n" | |
373 | + json add warning "errorOutputFileCreate" "${i}" | |
374 | + output "${_WARNING_}: $(get_text 'warningMissingRecommendedPackages'), install them by running:\\n" | |
356 | 375 | output "$s;\\n" |
357 | 376 | fi |
358 | 377 | fi |
@@ -390,7 +409,8 @@ load_environment() { | ||
390 | 409 | cache 'test_gzip' && return 0 |
391 | 410 | network_flush_cache; network_find_wan wan_if; network_get_gateway wan_gw "$wan_if"; |
392 | 411 | [ -n "$wan_gw" ] && return 0 |
393 | - output "$_ERROR_: $serviceName failed to discover WAN gateway.\\n"; return 1; | |
412 | + json add error "errorNoWanGateway" | |
413 | + output "${_ERROR_}: $(get_text 'errorNoWanGateway')!\\n"; return 1; | |
394 | 414 | } |
395 | 415 | |
396 | 416 | resolver() { |
@@ -424,7 +444,7 @@ dns() { | ||
424 | 444 | if [ ! -s "$outputFile" ]; then |
425 | 445 | json set status "statusFail" |
426 | 446 | json add error "errorOutputFileCreate" |
427 | - output "$_ERROR_: $(get_error_text 'errorOutputFileCreate')!\\n" | |
447 | + output "${_ERROR_}: $(get_text 'errorOutputFileCreate')!\\n" | |
428 | 448 | return 1 |
429 | 449 | fi |
430 | 450 |
@@ -473,7 +493,7 @@ dns() { | ||
473 | 493 | output_fail |
474 | 494 | json set status "statusFail" |
475 | 495 | json add error "errorDNSReload" |
476 | - output "$_ERROR_: $(get_error_text 'errorDNSReload')!\\n" | |
496 | + output "${_ERROR_}: $(get_text 'errorDNSReload')!\\n" | |
477 | 497 | return 1 |
478 | 498 | fi |
479 | 499 | ;; |
@@ -518,6 +538,9 @@ dns() { | ||
518 | 538 | json() { |
519 | 539 | # shellcheck disable=SC2034 |
520 | 540 | local action="$1" param="$2" value="$3" |
541 | + shift 3 | |
542 | +# shellcheck disable=SC2124 | |
543 | + local extras="$@" line | |
521 | 544 | local status message error stats |
522 | 545 | local reload restart curReload curRestart ret i |
523 | 546 | if [ -s "$jsonFile" ]; then |
@@ -549,10 +572,8 @@ json() { | ||
549 | 572 | esac |
550 | 573 | ;; |
551 | 574 | add) |
552 | - if [ -n "$(eval echo "\$$param")" ]; then | |
553 | - value="$(eval echo "\$$param") ${value}" | |
554 | - fi | |
555 | - eval "$param"='${value}' | |
575 | + line="$(eval echo "\$$param")" | |
576 | + eval "$param"='${line:+$line }${value}${extras:+|$extras}' | |
556 | 577 | ;; |
557 | 578 | del) |
558 | 579 | case "$param" in |
@@ -573,7 +594,7 @@ json() { | ||
573 | 594 | restart="$compressed_cache $force_dns $led $force_dns_port" |
574 | 595 | ;; |
575 | 596 | *) |
576 | - eval "$param"='$value';; | |
597 | + eval "$param"='${value}${extras:+|$extras}';; | |
577 | 598 | esac |
578 | 599 | ;; |
579 | 600 | esac |
@@ -678,7 +699,7 @@ process_url() { | ||
678 | 699 | download_dnsmasq_file() { |
679 | 700 | local hf allow_filter j=0 R_TMP |
680 | 701 | |
681 | - json set message "$(get_status_text "statusDownloading")..." | |
702 | + json set message "$(get_text "statusDownloading")..." | |
682 | 703 | json set status "statusDownloading" |
683 | 704 | |
684 | 705 | rm -f "$A_TMP" "$B_TMP" "$outputFile" "$outputCache" "$outputGzip" |
@@ -714,7 +735,7 @@ download_dnsmasq_file() { | ||
714 | 735 | download_lists() { |
715 | 736 | local hf allow_filter j=0 R_TMP |
716 | 737 | |
717 | - json set message "$(get_status_text "statusDownloading")..." | |
738 | + json set message "$(get_text "statusDownloading")..." | |
718 | 739 | json set status "statusDownloading" |
719 | 740 | |
720 | 741 | rm -f "$A_TMP" "$B_TMP" "$outputFile" "$outputCache" "$outputGzip" |
@@ -775,7 +796,8 @@ $(cat $A_TMP)" | ||
775 | 796 | |
776 | 797 | output 1 'Processing downloads ' |
777 | 798 | output 2 'Sorting combined list ' |
778 | - json set message "$(get_status_text "statusProcessing"): sorting combined list" | |
799 | + json set status "statusProcessing" | |
800 | + json set message "$(get_text "statusProcessing"): sorting combined list" | |
779 | 801 | if [ "$allow_non_ascii" -gt 0 ]; then |
780 | 802 | if sort -u "$B_TMP" > "$A_TMP"; then |
781 | 803 | output_ok |
@@ -799,7 +821,7 @@ $(cat $A_TMP)" | ||
799 | 821 | [ "$dns" = 'unbound.adb_list' ]; then |
800 | 822 | # TLD optimization written by Dirk Brenken (dev@brenken.org) |
801 | 823 | output 2 'Optimizing combined list ' |
802 | - json set message "$(get_status_text "statusProcessing"): optimizing combined list" | |
824 | + json set message "$(get_text "statusProcessing"): optimizing combined list" | |
803 | 825 | # sed -E 'G;:t;s/(.*)(\.)(.*)(\n)(.*)/\1\4\5\2\3/;tt;s/(.*)\n(\.)(.*)/\3\2\1/' is actually slower than command below |
804 | 826 | if $awk -F "." '{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' "$A_TMP" > "$B_TMP"; then |
805 | 827 | if sort "$B_TMP" > "$A_TMP"; then |
@@ -835,7 +857,7 @@ $(cat $A_TMP)" | ||
835 | 857 | fi |
836 | 858 | |
837 | 859 | output 2 'Allowing domains ' |
838 | - json set message "$(get_status_text "statusProcessing"): allowing domains" | |
860 | + json set message "$(get_text "statusProcessing"): allowing domains" | |
839 | 861 | if sed -i -E "$allow_filter" "$B_TMP"; then |
840 | 862 | output_ok |
841 | 863 | else |
@@ -844,7 +866,7 @@ $(cat $A_TMP)" | ||
844 | 866 | fi |
845 | 867 | |
846 | 868 | output 2 'Formatting merged file ' |
847 | - json set message "$(get_status_text "statusProcessing"): formatting merged file" | |
869 | + json set message "$(get_text "statusProcessing"): formatting merged file" | |
848 | 870 | if [ -z "$outputFilterIPv6" ]; then |
849 | 871 | if sed "$outputFilter" "$B_TMP" > "$A_TMP"; then |
850 | 872 | output_ok |
@@ -869,27 +891,27 @@ $(cat $A_TMP)" | ||
869 | 891 | case "$dns" in |
870 | 892 | dnsmasq.addnhosts) |
871 | 893 | output 2 'Creating dnsmasq addnhosts file ' |
872 | - json set message "$(get_status_text "statusProcessing"): creating dnsmasq addnhosts file" | |
894 | + json set message "$(get_text "statusProcessing"): creating dnsmasq addnhosts file" | |
873 | 895 | ;; |
874 | 896 | dnsmasq.conf) |
875 | 897 | output 2 'Creating dnsmasq config file ' |
876 | - json set message "$(get_status_text "statusProcessing"): creating dnsmasq config file" | |
898 | + json set message "$(get_text "statusProcessing"): creating dnsmasq config file" | |
877 | 899 | ;; |
878 | 900 | dnsmasq.ipset) |
879 | 901 | output 2 'Creating dnsmasq ipset file ' |
880 | - json set message "$(get_status_text "statusProcessing"): creating dnsmasq ipset file" | |
902 | + json set message "$(get_text "statusProcessing"): creating dnsmasq ipset file" | |
881 | 903 | ;; |
882 | 904 | dnsmasq.nftset) |
883 | 905 | output 2 'Creating dnsmasq nft set file ' |
884 | - json set message "$(get_status_text "statusProcessing"): creating dnsmasq nft set file" | |
906 | + json set message "$(get_text "statusProcessing"): creating dnsmasq nft set file" | |
885 | 907 | ;; |
886 | 908 | dnsmasq.servers) |
887 | 909 | output 2 'Creating dnsmasq servers file ' |
888 | - json set message "$(get_status_text "statusProcessing"): creating dnsmasq servers file" | |
910 | + json set message "$(get_text "statusProcessing"): creating dnsmasq servers file" | |
889 | 911 | ;; |
890 | 912 | unbound.adb_list) |
891 | 913 | output 2 'Creating Unbound adb_list file ' |
892 | - json set message "$(get_status_text "statusProcessing"): creating Unbound adb_list file" | |
914 | + json set message "$(get_text "statusProcessing"): creating Unbound adb_list file" | |
893 | 915 | ;; |
894 | 916 | esac |
895 | 917 |
@@ -901,7 +923,7 @@ $(cat $A_TMP)" | ||
901 | 923 | fi |
902 | 924 | if [ "$compressed_cache" -gt 0 ]; then |
903 | 925 | output 2 'Creating compressed cache ' |
904 | - json set message "$(get_status_text "statusProcessing"): creating compressed cache" | |
926 | + json set message "$(get_text "statusProcessing"): creating compressed cache" | |
905 | 927 | if cache 'create_gzip'; then |
906 | 928 | output_ok |
907 | 929 | else |
@@ -912,7 +934,7 @@ $(cat $A_TMP)" | ||
912 | 934 | rm -f "$outputGzip" |
913 | 935 | fi |
914 | 936 | output 2 'Removing temporary files ' |
915 | - json set message "$(get_status_text "statusProcessing"): removing temporary files" | |
937 | + json set message "$(get_text "statusProcessing"): removing temporary files" | |
916 | 938 | rm -f "/tmp/${packageName}_tmp.*" "$A_TMP" "$B_TMP" "$outputCache" || j=1 |
917 | 939 | if [ $j -eq 0 ]; then |
918 | 940 | output_ok |
@@ -1183,7 +1205,7 @@ adb_start() { | ||
1183 | 1205 | else |
1184 | 1206 | output_failn |
1185 | 1207 | json add error "errorRestoreCompressedCache" |
1186 | - output "$_ERROR_: $(get_error_text 'errorRestoreCompressedCache')!\\n" | |
1208 | + output "${_ERROR_}: $(get_text 'errorRestoreCompressedCache')!\\n" | |
1187 | 1209 | action='download' |
1188 | 1210 | fi |
1189 | 1211 | fi |
@@ -1196,7 +1218,7 @@ adb_start() { | ||
1196 | 1218 | else |
1197 | 1219 | output_failn |
1198 | 1220 | json add error "errorRestoreCache" |
1199 | - output "$_ERROR_: $(get_error_text 'errorRestoreCache')!\\n" | |
1221 | + output "${_ERROR_}: $(get_text 'errorRestoreCache')!\\n" | |
1200 | 1222 | action='download' |
1201 | 1223 | fi |
1202 | 1224 | fi |
@@ -1342,7 +1364,7 @@ adb_status() { | ||
1342 | 1364 | if [ "$status" = "statusSuccess" ]; then |
1343 | 1365 | output "$stats "; output_okn; |
1344 | 1366 | else |
1345 | - [ -n "$status" ] && status="$(get_status_text "$status")" | |
1367 | + [ -n "$status" ] && status="$(get_text "$status")" | |
1346 | 1368 | if [ -n "$status" ] && [ -n "$message" ]; then |
1347 | 1369 | status="${status}: $message" |
1348 | 1370 | fi |
@@ -1354,9 +1376,9 @@ adb_status() { | ||
1354 | 1376 | c="${c%|*}" |
1355 | 1377 | case "$c" in |
1356 | 1378 | errorDownloadingList|errorParsingList) |
1357 | - output "$_ERROR_: $(get_error_text "$c") $url!\\n";; | |
1379 | + output "${_ERROR_}: $(get_text "$c") $url!\\n";; | |
1358 | 1380 | *) |
1359 | - output "$_ERROR_: $(get_error_text "$c")!\\n";; | |
1381 | + output "${_ERROR_}: $(get_text "$c")!\\n";; | |
1360 | 1382 | esac |
1361 | 1383 | n=$((n+1)) |
1362 | 1384 | done |
@@ -1382,7 +1404,7 @@ adb_stop() { | ||
1382 | 1404 | output 0 "$__FAIL__\\n"; output_fail; |
1383 | 1405 | json set status "statusFail" |
1384 | 1406 | json add error "errorStopping" |
1385 | - output "$_ERROR_: $(get_error_text 'errorStopping')!\\n" | |
1407 | + output "${_ERROR_}: $(get_text 'errorStopping')!\\n" | |
1386 | 1408 | fi |
1387 | 1409 | fi |
1388 | 1410 | } |