mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30: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}"
|
||||
_TIME="$(cat "${_ANSWER}")"
|
||||
# save the time
|
||||
#shellcheck disable=SC2027
|
||||
_DATETIME=""${_DATE}" "${_TIME}""
|
||||
timedatectl set-time "${_DATETIME}"
|
||||
_SET_TIME="1"
|
||||
|
|
|
@ -59,13 +59,14 @@ _select_mirror() {
|
|||
fi
|
||||
}
|
||||
|
||||
#shellcheck disable=SC2120
|
||||
_enable_testing() {
|
||||
if ! rg -q "^\[.*testing\]" /etc/pacman.conf; then
|
||||
_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 [[ -n "${_DOTESTING}" ]]; then
|
||||
if ! rg -q "^\[.*testing\]" /etc/pacman.conf; 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
|
||||
sd '^#(\[[c,e].*-testing\]\n)#' '$1' "${1}/etc/pacman.conf"
|
||||
_DOTESTING=1
|
||||
fi
|
||||
else
|
||||
_DOTESTING=1
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
. /etc/archboot/defaults
|
||||
. /etc/archboot/server-update.conf
|
||||
[[ -d "${_ISO_HOME_CHROOTS}" ]] || mkdir -p "${_ISO_HOME_CHROOTS}"
|
||||
cd "${_ISO_HOME_CHROOTS}"
|
||||
cd "${_ISO_HOME_CHROOTS}" || exit 1
|
||||
# stop if MASK is set
|
||||
[[ -e MASK ]] && exit 0
|
||||
for i in ${_SERVER_ARCH}; do
|
||||
|
|
|
@ -86,6 +86,7 @@ _result fw-error.log
|
|||
# uninstall base again!
|
||||
pacman --noconfirm -Rdd base gettext &>>"${_LOG}"
|
||||
_run_test "licenses"
|
||||
#shellcheck disable=SC2046
|
||||
for i in $(pacman -Ql $(pacman -Q | sd ' .*' '') | rg -o '/usr/share/licenses/.*'); do
|
||||
[[ -e "${i}" ]] || echo "${i}" | rg -v '/xz/' >>license-error.log
|
||||
done
|
||||
|
|
|
@ -250,19 +250,17 @@ _fix_network() {
|
|||
|
||||
_create_archboot_db() {
|
||||
echo "Creating reproducible repository db..."
|
||||
pushd ${1} >"${_NO_LOG}" || return 1
|
||||
pushd "${1}" >"${_NO_LOG}" || return 1
|
||||
#shellcheck disable=SC2046
|
||||
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
|
||||
mkdir repro
|
||||
cd repro
|
||||
bsdtar -xf ../${i} || return 1
|
||||
fd . -u --min-depth 1 -X touch -hcd "@0"
|
||||
fd --strip-cwd-prefix -t f -t l -u --min-depth 1 -0 | sort -z |
|
||||
bsdtar -C repro -xf "${i}" || return 1
|
||||
fd --base-directory repro . -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 |
|
||||
LC_ALL=C.UTF-8 bsdtar --null -cnf - -T - |
|
||||
LC_ALL=C.UTF-8 bsdtar --null -cf - --format=gnutar @- |
|
||||
zstd -T0 -19 >> "../${i}.zst" || return 1
|
||||
cd ..
|
||||
rm -r repro
|
||||
done
|
||||
rm archboot.{db,files}
|
||||
|
|
Loading…
Reference in a new issue