Skip to content

Commit d7eed20

Browse files
committed
chore: minor changes
Signed-off-by: ale5000 <15793015+ale5000-git@users.noreply.github.com>
1 parent 5f41f76 commit d7eed20

File tree

10 files changed

+31
-25
lines changed

10 files changed

+31
-25
lines changed

.github/workflows/auto-nightly.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ on:
88
push:
99
paths:
1010
- "LICENSES/*"
11+
- "conf/*.sh"
1112
- "docs/*.rst"
1213
- "includes/*"
1314
- "tools/*.jar"
1415
- "zip-content/**"
1516
- "CHANGELOG.rst"
1617
- "LICENSE*.rst"
1718
- "build.sh"
18-
- "conf-*.sh"
1919
branches:
2020
- "**"
2121
schedule:
@@ -52,15 +52,15 @@ jobs:
5252
uses: actions/cache@v5
5353
timeout-minutes: 5
5454
with:
55-
key: "build-${{ hashFiles('conf/full.inc.sh') }}"
55+
key: "build-${{ hashFiles('conf/conf-full.inc.sh') }}"
5656
restore-keys: "build-"
5757
path: "cache/build"
5858
enableCrossOsArchive: true
5959
- name: "Use LFS cache"
6060
uses: actions/cache@v5
6161
timeout-minutes: 5
6262
with:
63-
key: "lfs-${{ hashFiles('conf/lfs.inc.sh') }}"
63+
key: "lfs-${{ hashFiles('conf/conf-lfs.inc.sh') }}"
6464
restore-keys: "lfs-"
6565
path: "cache/lfs"
6666
enableCrossOsArchive: true
@@ -267,14 +267,14 @@ jobs:
267267
with:
268268
lfs: false
269269
sparse-checkout: |
270-
conf/full.inc.sh
271-
conf/lfs.inc.sh
270+
conf/conf-full.inc.sh
271+
conf/conf-lfs.inc.sh
272272
sparse-checkout-cone-mode: false
273273
- name: "Ping build cache" # Cache expiration: 7 days
274274
uses: actions/cache/restore@v5
275275
timeout-minutes: 5
276276
with:
277-
key: "build-${{ hashFiles('conf/full.inc.sh') }}"
277+
key: "build-${{ hashFiles('conf/conf-full.inc.sh') }}"
278278
restore-keys: "build-"
279279
path: "cache/build"
280280
enableCrossOsArchive: true
@@ -283,7 +283,7 @@ jobs:
283283
uses: actions/cache/restore@v5
284284
timeout-minutes: 5
285285
with:
286-
key: "lfs-${{ hashFiles('conf/lfs.inc.sh') }}"
286+
key: "lfs-${{ hashFiles('conf/conf-lfs.inc.sh') }}"
287287
restore-keys: "lfs-"
288288
path: "cache/lfs"
289289
enableCrossOsArchive: true

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ jobs:
4747
uses: actions/cache/restore@v5
4848
timeout-minutes: 5
4949
with:
50-
key: "build-${{ hashFiles('conf/full.inc.sh') }}"
50+
key: "build-${{ hashFiles('conf/conf-full.inc.sh') }}"
5151
restore-keys: "build-"
5252
path: "cache/build"
5353
enableCrossOsArchive: true
5454
- name: "Use LFS cache"
5555
uses: actions/cache/restore@v5
5656
timeout-minutes: 5
5757
with:
58-
key: "lfs-${{ hashFiles('conf/lfs.inc.sh') }}"
58+
key: "lfs-${{ hashFiles('conf/conf-lfs.inc.sh') }}"
5959
restore-keys: "lfs-"
6060
path: "cache/lfs"
6161
enableCrossOsArchive: true

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ stages:
3535
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
3636
changes:
3737
- "LICENSES/*"
38+
- "conf/*.sh"
3839
- "docs/*.rst"
3940
- "includes/*"
4041
- "tools/*.jar"
4142
- "zip-content/**"
4243
- "CHANGELOG.rst"
4344
- "LICENSE*.rst"
4445
- "build.sh"
45-
- "conf-*.sh"
4646
when: always
4747
cache: []
4848
script: "BUILD_TYPE='oss' './build.sh'"
@@ -54,14 +54,14 @@ build-job:
5454
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
5555
changes:
5656
- "LICENSES/*"
57+
- "conf/*.sh"
5758
- "docs/*.rst"
5859
- "includes/*"
5960
- "tools/*.jar"
6061
- "zip-content/**"
6162
- "CHANGELOG.rst"
6263
- "LICENSE*.rst"
6364
- "build.sh"
64-
- "conf-*.sh"
6565
when: always
6666
- if: $CI_PIPELINE_SOURCE == "schedule"
6767
when: always

build.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,12 @@ detect_script_dir || return 1 2>&- || exit 1
6464
export BUILD_CACHE_DIR="${MAIN_DIR:?}/cache/build"
6565
export LFS_CACHE_DIR="${MAIN_DIR:?}/cache/lfs"
6666

67-
unset DO_INIT_CMDLINE
68-
# shellcheck source=SCRIPTDIR/lib/main.lib.sh
69-
if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then . "${MAIN_DIR:?}/lib/main.lib.sh"; fi
67+
{
68+
unset DO_INIT_CMDLINE
69+
readonly LIB_FILENAME='main.lib.sh'
70+
# shellcheck source=SCRIPTDIR/lib/main.lib.sh
71+
if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then . "${MAIN_DIR:?}/lib/${LIB_FILENAME:?}"; fi
72+
}
7073

7174
if test -n "${OPENSOURCE_ONLY-}"; then
7275
ui_error 'You must set BUILD_TYPE instead of OPENSOURCE_ONLY' "${LINENO-}" "${FUNCNAME-}"
@@ -99,10 +102,10 @@ esac
99102
save_last_title
100103
set_title 'Building the flashable zip...'
101104

102-
# shellcheck source=SCRIPTDIR/conf/common.inc.sh
103-
. "${MAIN_DIR:?}/conf/common.inc.sh"
104-
# shellcheck source=SCRIPTDIR/conf/full.inc.sh
105-
if test "${OPENSOURCE_ONLY:?}" = 'false'; then . "${MAIN_DIR:?}/conf/full.inc.sh"; fi
105+
# shellcheck source=SCRIPTDIR/conf/conf-common.inc.sh
106+
. "${MAIN_DIR:?}/conf/conf-common.inc.sh"
107+
# shellcheck source=SCRIPTDIR/conf/conf-full.inc.sh
108+
if test "${OPENSOURCE_ONLY:?}" = 'false'; then . "${MAIN_DIR:?}/conf/conf-full.inc.sh"; fi
106109

107110
_init_dir="$(pwd)" || ui_error 'Failed to read the current dir' "${LINENO-}" "${FUNCNAME-}"
108111

cmdline.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SET "IS_PATH_INITIALIZED="
2929
SET "__QUOTED_PARAMS="
3030
SET "__SHELL_EXE=%~dp0tools\win\busybox.exe"
3131

32-
"%__SHELL_EXE%" ash -s -c ". '%~dp0lib\main.lib.sh' || exit ${?}" "ash" %*
32+
"%__SHELL_EXE%" ash -s -c "readonly LIB_FILENAME='main.lib.sh'; . '%~dp0lib\main.lib.sh' || exit ${?}" "ash" %*
3333

3434
ENDLOCAL 2> nul
3535
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%

cmdline.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then
9898
unset IS_PATH_INITIALIZED
9999
unset __QUOTED_PARAMS
100100

101+
readonly LIB_FILENAME='main.lib.sh'
102+
export LIB_FILENAME
103+
101104
if test "${_run_strategy}" = 'source'; then
102-
. "${_main_dir}/lib/main.lib.sh" "${@}" || return "${?}"
105+
. "${_main_dir}/lib/${LIB_FILENAME}" "${@}" || return "${?}"
103106
elif test "${_run_strategy}" = 's-opt'; then
104107
# shellcheck disable=SC2086 # Ignore: Double quote to prevent globbing and word splitting
105-
exec "${__SHELL_EXE}" ${_applet} -s -c ". '${_main_dir}/lib/main.lib.sh' || exit \${?}" "${_applet:-${0-}}" "${@}"
108+
exec "${__SHELL_EXE}" ${_applet} -s -c ". '${_main_dir}/lib/${LIB_FILENAME}' || exit \${?}" "${_applet:-${0-}}" "${@}"
106109
else
107110
if test "${#}" -gt 0; then
108111
_nl="$(printf '\nx')" _nl="${_nl%x}"
@@ -117,7 +120,7 @@ if test "${A5K_FUNCTIONS_INCLUDED:-false}" = 'false'; then
117120
fi
118121

119122
# shellcheck disable=SC2086 # Ignore: Double quote to prevent globbing and word splitting
120-
exec "${__SHELL_EXE}" ${_applet} --init-file "${_main_dir}/lib/main.lib.sh"
123+
exec "${__SHELL_EXE}" ${_applet} --init-file "${_main_dir}/lib/${LIB_FILENAME}"
121124
fi
122125
}
123126

File renamed without changes.
File renamed without changes.

lib/main.lib.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ui_error()
8585

8686
_ui_error_local()
8787
{
88-
ui_error "${1:?}" "${2-}" "${3-}" 'common.lib.sh'
88+
ui_error "${1:?}" "${2-}" "${3-}" "${LIB_FILENAME:?}"
8989
}
9090

9191
ui_error_msg()
@@ -978,7 +978,7 @@ download_cached_if_lfs_pointer()
978978
local _expected_sha256 _mirror_url
979979

980980
# shellcheck source=/dev/null
981-
command 1> /dev/null -v 'conf_lfs_get_mirror_by_sha256' || command . "${MAIN_DIR:?}/conf/lfs.inc.sh" || _ui_error_local "Failed to source 'conf/lfs.inc.sh'" "${LINENO-}" "${FUNCNAME-}"
981+
command 1> /dev/null -v 'conf_lfs_get_mirror_by_sha256' || command . "${MAIN_DIR:?}/conf/conf-lfs.inc.sh" || _ui_error_local "Failed to source 'conf/conf-lfs.inc.sh'" "${LINENO-}" "${FUNCNAME-}"
982982
_mirror_url="$(conf_lfs_get_mirror_by_sha256 "${3:?}")" || _ui_error_local "Failed to get the mirror" "${LINENO-}" "${FUNCNAME-}"
983983

984984
_expected_sha256=$(grep -m 1 -e '^oid sha256:' -- "${2:?}/${1:?}" | cut -d ':' -f 2 -s) || _ui_error_local "Failed to extract the SHA256 hash from the LFS pointer" "${LINENO-}" "${FUNCNAME-}"
@@ -1515,7 +1515,7 @@ init_cmdline()
15151515

15161516
if test -f "${MAIN_DIR:?}/lib/inc/custom-aliases.inc.sh"; then
15171517
# shellcheck source=/dev/null
1518-
. "${MAIN_DIR:?}/lib/inc/custom-aliases.inc.sh" || _ui_error_local 'Unable to source lib/inc/custom-aliases.inc.sh' "${LINENO-}" "${FUNCNAME-}"
1518+
. "${MAIN_DIR:?}/lib/inc/custom-aliases.inc.sh" || _ui_error_local "Unable to source 'inc/custom-aliases.inc.sh'" "${LINENO-}" "${FUNCNAME-}"
15191519
fi
15201520

15211521
alias 'build'='build.sh'

0 commit comments

Comments
 (0)