mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
shellcheck fixes
This commit is contained in:
parent
06e43eb939
commit
9037da225e
4 changed files with 4 additions and 6 deletions
|
@ -82,7 +82,7 @@ _upload_efi_files() {
|
||||||
sudo -u "${_USER}" gpg ${_GPG} "${i}" || exit 1
|
sudo -u "${_USER}" gpg ${_GPG} "${i}" || exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
sudo -u "${_USER}" rsync --delete --delete-after -a ./* "${_SERVER}:.${_ARCH_SERVERDIR}/" || exit 1
|
sudo -u "${_USER}" "${_RSYNC}" ./* "${_SERVER}:.${_ARCH_SERVERDIR}/" || exit 1
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ _PACMAN_CONF="/etc/pacman.conf"
|
||||||
_PACMAN_LIB="/var/lib/pacman"
|
_PACMAN_LIB="/var/lib/pacman"
|
||||||
_CACHEDIR="/var/cache/pacman/pkg"
|
_CACHEDIR="/var/cache/pacman/pkg"
|
||||||
_LOCAL_DB="${_CACHEDIR}/archboot.db"
|
_LOCAL_DB="${_CACHEDIR}/archboot.db"
|
||||||
|
_RSYNC="rsync -a -q --delete --delete-after"
|
||||||
_FIX_PACKAGES="libelf libevent talloc gcc-libs glibc glib2 pcre2 nss terminus-font"
|
_FIX_PACKAGES="libelf libevent talloc gcc-libs glibc glib2 pcre2 nss terminus-font"
|
||||||
_XORG_PACKAGE="xorg"
|
_XORG_PACKAGE="xorg"
|
||||||
_VNC_PACKAGE="tigervnc"
|
_VNC_PACKAGE="tigervnc"
|
||||||
|
|
|
@ -113,13 +113,10 @@ _create_iso() {
|
||||||
cp /usr/share/licenses/intel-ucode/* boot/licenses/intel-ucode/
|
cp /usr/share/licenses/intel-ucode/* boot/licenses/intel-ucode/
|
||||||
_EFISTUB="/usr/lib/systemd/boot/efi/linuxx64.efi.stub"
|
_EFISTUB="/usr/lib/systemd/boot/efi/linuxx64.efi.stub"
|
||||||
echo "console=ttyS0,115200 console=tty0 audit=0 systemd.show_status=auto" > ${_CMDLINE}
|
echo "console=ttyS0,115200 console=tty0 audit=0 systemd.show_status=auto" > ${_CMDLINE}
|
||||||
_AMD_UCODE="${_AMD_UCODE}"
|
|
||||||
_INTEL_UCODE="${_INTEL_UCODE}"
|
|
||||||
fi
|
fi
|
||||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||||
echo "nr_cpus=1 console=ttyAMA0,115200 console=tty0 loglevel=4 audit=0 systemd.show_status=auto" > ${_CMDLINE}
|
echo "nr_cpus=1 console=ttyAMA0,115200 console=tty0 loglevel=4 audit=0 systemd.show_status=auto" > ${_CMDLINE}
|
||||||
_EFISTUB="/usr/lib/systemd/boot/efi/linuxaa64.efi.stub"
|
_EFISTUB="/usr/lib/systemd/boot/efi/linuxaa64.efi.stub"
|
||||||
_AMD_UCODE="${_AMD_UCODE}"
|
|
||||||
_INTEL_UCODE=""
|
_INTEL_UCODE=""
|
||||||
# replace aarch64 Image.gz with Image kernel for UKI, compressed image is not working at the moment
|
# replace aarch64 Image.gz with Image kernel for UKI, compressed image is not working at the moment
|
||||||
cp "${_W_DIR}/boot/Image" "boot/Image-archboot-${_ARCH}"
|
cp "${_W_DIR}/boot/Image" "boot/Image-archboot-${_ARCH}"
|
||||||
|
|
|
@ -48,7 +48,7 @@ _update_pacman_chroot() {
|
||||||
sudo -u "${_USER}" gpg ${_GPG} "${_PACMAN_CHROOT}" || exit 1
|
sudo -u "${_USER}" gpg ${_GPG} "${_PACMAN_CHROOT}" || exit 1
|
||||||
chown "${_USER}:${_GROUP}" "${_PACMAN_CHROOT}"{,.sig} || exit 1
|
chown "${_USER}:${_GROUP}" "${_PACMAN_CHROOT}"{,.sig} || exit 1
|
||||||
echo "Syncing files to ${_SERVER}:${_SERVER_PACMAN}..."
|
echo "Syncing files to ${_SERVER}:${_SERVER_PACMAN}..."
|
||||||
sudo -u "${_USER}" rsync -a --delete --delete-after "${_PACMAN_CHROOT}"{,.sig} "${_SERVER}:.${_SERVER_PACMAN}/" || exit 1
|
sudo -u "${_USER}" "${_RSYNC}" "${_PACMAN_CHROOT}"{,.sig} "${_SERVER}:.${_SERVER_PACMAN}/" || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
_server_upload() {
|
_server_upload() {
|
||||||
|
@ -56,7 +56,7 @@ _server_upload() {
|
||||||
echo "Syncing files to ${_SERVER}:${1}/${_ARCH}..."
|
echo "Syncing files to ${_SERVER}:${1}/${_ARCH}..."
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
sudo -u "${_USER}" ssh "${_SERVER}" [[ -d "./${1}/${_ARCH}" ]] || mkdir -p ".${1}/${_ARCH}"
|
sudo -u "${_USER}" ssh "${_SERVER}" [[ -d "./${1}/${_ARCH}" ]] || mkdir -p ".${1}/${_ARCH}"
|
||||||
sudo -u "${_USER}" rsync --delete --delete-after -a "${_DIR}" "${_SERVER}":".${1}/${_ARCH}/" || exit 1
|
sudo -u "${_USER}" "${_RSYNC}" "${_DIR}" "${_SERVER}":".${1}/${_ARCH}/" || exit 1
|
||||||
# move files on server, create symlink and removing ${_PURGE_DATE} old release
|
# move files on server, create symlink and removing ${_PURGE_DATE} old release
|
||||||
sudo -u "${_USER}" ssh "${_SERVER}" <<EOF
|
sudo -u "${_USER}" ssh "${_SERVER}" <<EOF
|
||||||
echo "Removing old purge date reached .${1}/${_ARCH}/$(date -d "$(date +) - ${_PURGE_DATE}" +%Y.%m) directory..."
|
echo "Removing old purge date reached .${1}/${_ARCH}/$(date -d "$(date +) - ${_PURGE_DATE}" +%Y.%m) directory..."
|
||||||
|
|
Loading…
Reference in a new issue