Skip to content

Commit a9d63e9

Browse files
committed
chore: sync with microG unofficial installer
Signed-off-by: ale5000 <15793015+ale5000-git@users.noreply.github.com>
1 parent 70134ef commit a9d63e9

File tree

10 files changed

+56
-24
lines changed

10 files changed

+56
-24
lines changed

.editorconfig

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,20 @@ switch_case_indent = true
2121
space_redirects = true
2222
function_next_line = true
2323

24+
[*.{yml,yaml,rst,md,json}]
25+
quote_type = double
26+
2427
[*.{sh,xml,toml,license,dat,txt,yml,gradle}]
2528
max_line_length = 265 # ToDO: try to reduce to 99
2629

2730
[recovery-simulator/override/*]
2831
max_line_length = 150 # ToDO: try to reduce to 99
2932

33+
[*.py]
34+
indent_size = 4
35+
quote_type = double
36+
max_line_length = 80
37+
3038
[*.{rst,js,mjs}]
3139
max_line_length = 80
3240

@@ -45,9 +53,6 @@ end_of_line = crlf
4553
[*.{xml,json,gradle}]
4654
indent_size = 4
4755

48-
[*.{yml,yaml,rst,md,json}]
49-
quote_type = double
50-
5156
[zip-content/customize.sh]
5257
keep_padding = true
5358

.github/workflows/auto-release-from-tag.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ jobs:
110110
- name: "Release logic"
111111
id: "release-logic"
112112
shell: bash
113+
env:
114+
INPUT_TAG_NAME: "${{ github.event_name == 'workflow_dispatch' && inputs.tag-name || '' }}" # The "workflow_call" event still pass as "workflow_dispatch"
115+
INPUT_TAG_NAME_VALID: "${{ startsWith(inputs.tag-name, 'v') }}"
113116
run: |
114117
# Release logic...
115118
CREATE_RELEASE='false'
@@ -119,11 +122,11 @@ jobs:
119122
printf 'CREATE_RELEASE=%s\n' "${CREATE_RELEASE:?}" 1>> "${GITHUB_OUTPUT?}"
120123
printf 'Create release? %s\n' "${CREATE_RELEASE:?}"
121124
# Verifying tag name...
122-
if '${{ github.event_name == 'workflow_dispatch' && inputs.tag-name != '' }}'; then # The "workflow_call" event still pass as "workflow_dispatch"
123-
if '${{ startsWith(inputs.tag-name, 'v') }}'; then
124-
TAG_NAME='${{ inputs.tag-name }}'
125+
if test -n "${INPUT_TAG_NAME?}"; then
126+
if test "${INPUT_TAG_NAME_VALID:?}" == 'true'; then
127+
TAG_NAME="${INPUT_TAG_NAME:?}"
125128
else
126-
printf '%s\n' '::error::Invalid "tag-name" parameter: ${{ inputs.tag-name }}'
129+
printf '%s\n' "::error::Invalid 'tag-name' parameter: ${INPUT_TAG_NAME?}"
127130
exit 3
128131
fi
129132
elif '${{ startsWith(github.ref, 'refs/tags/v') }}'; then

.readthedocs.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ build:
1414
python: "3"
1515
jobs:
1616
post_install:
17-
- pip install Sphinx==9.1.0 sphinx-rtd-theme
17+
# Install Sphinx and other extensions
18+
- pip install Sphinx==9.1.0 sphinx-rtd-theme myst-parser
1819

1920
# Build documentation in the "docs/" directory with Sphinx
2021
sphinx:

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"recommendations": [
3+
"charliermarsh.ruff",
34
"codecov.codecov",
45
"editorconfig.editorconfig",
56
"jkillian.custom-local-formatters",

.vscode/settings.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"autoDocstring.docstringFormat": "sphinx",
2828
"autoDocstring.guessTypes": true,
2929

30-
"editor.formatOnSave": true,
3130
"editor.detectIndentation": true,
3231
"files.insertFinalNewline": true,
3332

@@ -42,12 +41,27 @@
4241
"editor.formatOnSave": false
4342
}
4443
],
45-
4644
"[restructuredtext]": {
4745
"editor.detectIndentation": false,
4846
"editor.insertSpaces": true,
4947
"editor.tabSize": 3,
5048
"editor.wordWrap": "on",
5149
"editor.defaultFormatter": "jkillian.custom-local-formatters"
50+
},
51+
52+
"ruff.configuration": {
53+
"target-version": "py37"
54+
},
55+
"ruff.lineLength": 80,
56+
"ruff.lint.select": ["ALL"],
57+
"ruff.lint.ignore": ["ANN001", "ANN201", "ANN202", "PTH", "UP009"],
58+
"[python]": {
59+
"editor.rulers": [80, 100, 120],
60+
"editor.defaultFormatter": "charliermarsh.ruff",
61+
"editor.formatOnSave": true,
62+
"editor.codeActionsOnSave": {
63+
"source.fixAll.ruff": "explicit",
64+
"source.organizeImports.ruff": "explicit"
65+
}
5266
}
5367
}

includes/common.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ set_title()
212212
set_default_title()
213213
{
214214
if is_root; then
215-
set_title "[root] Command-line: ${__TITLE_CMD_PREFIX-}${__TITLE_CMD_0-}${__TITLE_CMD_PARAMS-}"
215+
set_title "[root] CLI: ${__TITLE_CMD_PREFIX-}${__TITLE_CMD_0-}${__TITLE_CMD_PARAMS-}"
216216
else
217-
set_title "Command-line: ${__TITLE_CMD_PREFIX-}${__TITLE_CMD_0-}${__TITLE_CMD_PARAMS-}"
217+
set_title "CLI: ${__TITLE_CMD_PREFIX-}${__TITLE_CMD_0-}${__TITLE_CMD_PARAMS-}"
218218
fi
219219
A5K_TITLE_IS_DEFAULT='true'
220220
}
@@ -242,7 +242,7 @@ __update_title_and_ps1()
242242
{
243243
local _title
244244
# shellcheck disable=SC3028 # Ignore: In POSIX sh, SHLVL is undefined
245-
_title="Command-line: ${__TITLE_CMD_PREFIX-}$(basename 2> /dev/null "${0:--}" || printf '%s' "${0:--}" || :)$(test "${#}" -eq 0 || printf ' "%s"' "${@}" || :) (${SHLVL-}) - ${MODULE_NAME-}"
245+
_title="CLI: ${__TITLE_CMD_PREFIX-}$(basename 2> /dev/null "${0:--}" || printf '%s' "${0:--}" || :)$(test "${#}" -eq 0 || printf ' "%s"' "${@}" || :) (${SHLVL-}) - ${MODULE_NAME-}"
246246
PS1="${__DEFAULT_PS1-}"
247247

248248
if is_root; then
@@ -1240,21 +1240,25 @@ create_bb_alias_if_missing()
12401240
if ! command 1> /dev/null -v "${1:?}"; then alias "${1:?}"="busybox '${1:?}'"; fi
12411241
}
12421242

1243-
alias_tools_and_utils()
1243+
alias_scripts()
12441244
{
1245-
local _file _basename _alias_name
1245+
local _file _alias_name
12461246

1247-
for _file in "${MAIN_DIR:?}"/tools/*.sh "${MAIN_DIR:?}"/utils/*.sh; do
1247+
test -d "${1:?}" || return
1248+
1249+
for _file in "${1:?}"/*.sh; do
12481250
test -f "${_file:?}" || continue
12491251

12501252
# Strip the directory path (e.g., dir-name/script.sh -> script.sh)
1251-
_basename="${_file##*/}"
1253+
_alias_name="${_file##*/}"
12521254
# Strip the .sh extension (e.g., script.sh -> script)
1253-
_alias_name="${_basename%".sh"}"
1254-
# Create the alias mapping the short name to the full path
1255+
_alias_name="${_alias_name%".sh"}"
1256+
12551257
# shellcheck disable=SC2139 # Ignore: This expands when defined, not when used
12561258
alias "${_alias_name:?}"="'${_file:?}'"
12571259
done
1260+
1261+
return
12581262
}
12591263

12601264
init_base()
@@ -1401,8 +1405,8 @@ init_cmdline()
14011405
fi
14021406

14031407
# shellcheck disable=SC3028 # In POSIX sh, SHLVL is undefined
1404-
if test -n "${KILL_PPID-}" && test -z "${NO_KILL-}" && test "${PLATFORM:?}" = 'win' && test "${SHLVL:-1}" = '1' && test -n "${PPID-}" && test "${PPID}" -gt 1; then
1405-
if kill 2> /dev/null "${PPID}" || kill -9 "${PPID}"; then
1408+
if test -n "${KILL_PPID-}" && test -z "${NO_KILL-}" && test "${PLATFORM:?}" = 'win' && test "${SHLVL:-1}" = '1' && test "${PPID:-0}" -gt 1; then
1409+
if kill 2> /dev/null "${PPID:?}" || kill -9 "${PPID:?}"; then
14061410
PPID='1'
14071411
fi
14081412
fi
@@ -1476,7 +1480,8 @@ init_cmdline()
14761480
fi
14771481
alias 'clear-prev'="printf '\033[A\33[2K\033[A\33[2K\r'"
14781482

1479-
alias_tools_and_utils
1483+
alias_scripts "${MAIN_DIR:?}/tools"
1484+
alias_scripts "${MAIN_DIR:?}/utils"
14801485

14811486
if test -f "${MAIN_DIR:?}/includes/custom-aliases.sh"; then
14821487
# shellcheck source=/dev/null

tools/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ TOOLS
99

1010
- zipsigner_ **3.0** => zipsigner.jar
1111
- zipsigner_ **3.0** (Dalvik) => zipsigner-dvk.jar
12-
- `BusyBox for Windows`_ **1.38.0-PRE-6007-g35e590816 (2026-02-25)** (w build) => win/busybox.exe
12+
- `BusyBox for Windows`_ **1.38.0-PRE-6047-g8d97f4176 (2026-03-21)** (w build) => win/busybox.exe
1313
- `BusyBox legacy for Windows`_ **1.21.0-TIG-931-g7e6a84d (2012-11-29)** => win/busybox-legacy.bin
1414
- Zip_ **3.0** => win/zip.exe
1515
- UnZip_ **6.0** => win/unzip.exe

tools/bits-info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
# @name Bits info
6-
# @brief Report bit-widths of the shell, OS, CPU, and POSIX utilities; detect the architecture of binary files.
6+
# @brief Report bit-widths of the shell, OS, CPU, and POSIX utilities; detect the architecture and type of binary files.
77
# @description Probes the integer width of the current shell (arithmetic,
88
# test built-in, printf signed/unsigned, $RANDOM seed) and of common POSIX
99
# utilities (awk printf, cut -b, date timestamps), and reports OS and CPU

tools/get-signature.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ readonly SCRIPT_SHORTNAME='AppSignExt'
1818
readonly SCRIPT_VERSION='0.1.1'
1919
readonly SCRIPT_AUTHOR='ale5000'
2020

21+
# shellcheck disable=SC3040 # Ignore: In POSIX sh, set option pipefail is undefined
22+
case "$(set 2> /dev/null -o || set || :)" in *'pipefail'*) set -o pipefail || echo 1>&2 'Failed: pipefail' ;; *) ;; esac
23+
2124
pause_if_needed()
2225
{
2326
# shellcheck disable=SC3028 # Ignore: In POSIX sh, SHLVL is undefined

tools/win/busybox.exe

-2 KB
Binary file not shown.

0 commit comments

Comments
 (0)