mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
shellcheck fixes
This commit is contained in:
parent
d24410fc36
commit
672b10b6fb
5 changed files with 11 additions and 10 deletions
|
@ -54,6 +54,7 @@ _timeset() {
|
||||||
_dialog --title " Time " --no-cancel --timebox "Use <TAB> to navigate and up/down to change values." 0 0 2>"${_ANSWER}"
|
_dialog --title " Time " --no-cancel --timebox "Use <TAB> to navigate and up/down to change values." 0 0 2>"${_ANSWER}"
|
||||||
_TIME="$(cat "${_ANSWER}")"
|
_TIME="$(cat "${_ANSWER}")"
|
||||||
# save the time
|
# save the time
|
||||||
|
#shellcheck disable=SC2027
|
||||||
_DATETIME=""${_DATE}" "${_TIME}""
|
_DATETIME=""${_DATE}" "${_TIME}""
|
||||||
timedatectl set-time "${_DATETIME}"
|
timedatectl set-time "${_DATETIME}"
|
||||||
_SET_TIME="1"
|
_SET_TIME="1"
|
||||||
|
|
|
@ -59,13 +59,14 @@ _select_mirror() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#shellcheck disable=SC2120
|
||||||
_enable_testing() {
|
_enable_testing() {
|
||||||
if ! rg -q "^\[.*testing\]" /etc/pacman.conf; then
|
|
||||||
_DOTESTING=""
|
_DOTESTING=""
|
||||||
_dialog --title " Testing Repositories " --defaultno --yesno "Do you want to enable testing repositories?\n\nOnly enable this if you need latest\navailable packages for testing purposes!" 8 50 && _DOTESTING=1
|
if ! rg -q "^\[.*testing\]" /etc/pacman.conf; then
|
||||||
if [[ -n "${_DOTESTING}" ]]; then
|
if _dialog --title " Testing Repositories " --defaultno --yesno "Do you want to enable testing repositories?\n\nOnly enable this if you need latest\navailable packages for testing purposes!" 8 50; then
|
||||||
#shellcheck disable=SC2016
|
#shellcheck disable=SC2016
|
||||||
sd '^#(\[[c,e].*-testing\]\n)#' '$1' "${1}/etc/pacman.conf"
|
sd '^#(\[[c,e].*-testing\]\n)#' '$1' "${1}/etc/pacman.conf"
|
||||||
|
_DOTESTING=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
_DOTESTING=1
|
_DOTESTING=1
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
. /etc/archboot/defaults
|
. /etc/archboot/defaults
|
||||||
. /etc/archboot/server-update.conf
|
. /etc/archboot/server-update.conf
|
||||||
[[ -d "${_ISO_HOME_CHROOTS}" ]] || mkdir -p "${_ISO_HOME_CHROOTS}"
|
[[ -d "${_ISO_HOME_CHROOTS}" ]] || mkdir -p "${_ISO_HOME_CHROOTS}"
|
||||||
cd "${_ISO_HOME_CHROOTS}"
|
cd "${_ISO_HOME_CHROOTS}" || exit 1
|
||||||
# stop if MASK is set
|
# stop if MASK is set
|
||||||
[[ -e MASK ]] && exit 0
|
[[ -e MASK ]] && exit 0
|
||||||
for i in ${_SERVER_ARCH}; do
|
for i in ${_SERVER_ARCH}; do
|
||||||
|
|
|
@ -86,6 +86,7 @@ _result fw-error.log
|
||||||
# uninstall base again!
|
# uninstall base again!
|
||||||
pacman --noconfirm -Rdd base gettext &>>"${_LOG}"
|
pacman --noconfirm -Rdd base gettext &>>"${_LOG}"
|
||||||
_run_test "licenses"
|
_run_test "licenses"
|
||||||
|
#shellcheck disable=SC2046
|
||||||
for i in $(pacman -Ql $(pacman -Q | sd ' .*' '') | rg -o '/usr/share/licenses/.*'); do
|
for i in $(pacman -Ql $(pacman -Q | sd ' .*' '') | rg -o '/usr/share/licenses/.*'); do
|
||||||
[[ -e "${i}" ]] || echo "${i}" | rg -v '/xz/' >>license-error.log
|
[[ -e "${i}" ]] || echo "${i}" | rg -v '/xz/' >>license-error.log
|
||||||
done
|
done
|
||||||
|
|
|
@ -250,19 +250,17 @@ _fix_network() {
|
||||||
|
|
||||||
_create_archboot_db() {
|
_create_archboot_db() {
|
||||||
echo "Creating reproducible repository db..."
|
echo "Creating reproducible repository db..."
|
||||||
pushd ${1} >"${_NO_LOG}" || return 1
|
pushd "${1}" >"${_NO_LOG}" || return 1
|
||||||
#shellcheck disable=SC2046
|
#shellcheck disable=SC2046
|
||||||
LC_ALL=C.UTF-8 fd -u -t f -E '*.sig' . -X repo-add -q archboot.db.tar
|
LC_ALL=C.UTF-8 fd -u -t f -E '*.sig' . -X repo-add -q archboot.db.tar
|
||||||
for i in archboot.{db.tar,files.tar}; do
|
for i in archboot.{db.tar,files.tar}; do
|
||||||
mkdir repro
|
mkdir repro
|
||||||
cd repro
|
bsdtar -C repro -xf "${i}" || return 1
|
||||||
bsdtar -xf ../${i} || return 1
|
fd --base-directory repro . -u --min-depth 1 -X touch -hcd "@0"
|
||||||
fd . -u --min-depth 1 -X touch -hcd "@0"
|
fd --base-directory repro --strip-cwd-prefix -t f -t l -u --min-depth 1 -0 | sort -z |
|
||||||
fd --strip-cwd-prefix -t f -t l -u --min-depth 1 -0 | sort -z |
|
|
||||||
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
|
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
|
||||||
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=gnutar @- |
|
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=gnutar @- |
|
||||||
zstd -T0 -19 >> "../${i}.zst" || return 1
|
zstd -T0 -19 >> "../${i}.zst" || return 1
|
||||||
cd ..
|
|
||||||
rm -r repro
|
rm -r repro
|
||||||
done
|
done
|
||||||
rm archboot.{db,files}
|
rm archboot.{db,files}
|
||||||
|
|
Loading…
Reference in a new issue