From c1187fb8fd61d936f40751fd21a17662d06382a6 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 30 Jun 2023 07:20:04 +0200 Subject: [PATCH] rename update-installer to simple update --- ...ot-update-installer.sh => archboot-update.sh} | 12 ++++++------ usr/lib/archboot/installer/pacman.sh | 4 ++-- usr/lib/archboot/login.sh | 12 ++++++------ .../gnome-wayland.sh | 0 .../{update-installer => update}/gnome.sh | 0 .../plasma-wayland.sh | 0 .../{update-installer => update}/plasma.sh | 0 .../update-installer.sh | 16 ++++++++-------- .../{update-installer => update}/xfce.sh | 0 .../initcpio/install/archboot_installer_common | 4 ++-- usr/lib/initcpio/install/archboot_motd | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) rename usr/bin/{archboot-update-installer.sh => archboot-update.sh} (86%) rename usr/lib/archboot/{update-installer => update}/gnome-wayland.sh (100%) rename usr/lib/archboot/{update-installer => update}/gnome.sh (100%) rename usr/lib/archboot/{update-installer => update}/plasma-wayland.sh (100%) rename usr/lib/archboot/{update-installer => update}/plasma.sh (100%) rename usr/lib/archboot/{update-installer => update}/update-installer.sh (98%) rename usr/lib/archboot/{update-installer => update}/xfce.sh (100%) diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update.sh similarity index 86% rename from usr/bin/archboot-update-installer.sh rename to usr/bin/archboot-update.sh index 4dbd7fa62..15186dd12 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update.sh @@ -5,12 +5,12 @@ . /usr/lib/archboot/common.sh . /usr/lib/archboot/container.sh #shellcheck disable=SC1094 -. /usr/lib/archboot/update-installer/update-installer.sh -. /usr/lib/archboot/update-installer/xfce.sh -. /usr/lib/archboot/update-installer/gnome.sh -. /usr/lib/archboot/update-installer/gnome-wayland.sh -. /usr/lib/archboot/update-installer/plasma.sh -. /usr/lib/archboot/update-installer/plasma-wayland.sh +. /usr/lib/archboot/update/update.sh +. /usr/lib/archboot/update/xfce.sh +. /usr/lib/archboot/update/gnome.sh +. /usr/lib/archboot/update/gnome-wayland.sh +. /usr/lib/archboot/update/plasma.sh +. /usr/lib/archboot/update/plasma-wayland.sh [[ -z "${1}" ]] && usage while [ $# -gt 0 ]; do case ${1} in diff --git a/usr/lib/archboot/installer/pacman.sh b/usr/lib/archboot/installer/pacman.sh index 754d8c0a8..5e0846987 100644 --- a/usr/lib/archboot/installer/pacman.sh +++ b/usr/lib/archboot/installer/pacman.sh @@ -102,8 +102,8 @@ _update_environment() { echo -e "\e[93mGo and get a cup of coffee. Depending on your system setup,\e[m" echo -e "\e[93myou can \e[1mstart\e[m\e[93m with your tasks in about \e[1m5\e[m\e[93m minutes...\e[m" echo -e "\e[1mStarting\e[m assembling of archboot environment \e[1mwith\e[m package cache..." - echo -e "\e[1mRunning now: \e[92mupdate-installer -latest-install\e[m" - update-installer -latest-install + echo -e "\e[1mRunning now: \e[92mupdate -latest-install\e[m" + update -latest-install fi fi fi diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 8952abc91..872a9c84c 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -94,14 +94,14 @@ _enter_shell() { _run_latest() { echo -e "\e[1mStarting\e[m assembling of archboot environment \e[1mwithout\e[m package cache..." - echo -e "\e[1mRunning now: \e[92mupdate-installer -latest\e[m" - update-installer -latest | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null + echo -e "\e[1mRunning now: \e[92mupdate -latest\e[m" + update -latest | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null } _run_latest_install() { echo -e "\e[1mStarting\e[m assembling of archboot environment \e[1mwith\e[m package cache..." - echo -e "\e[1mRunning now: \e[92mupdate-installer -latest-install\e[m" - update-installer -latest-install | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null + echo -e "\e[1mRunning now: \e[92mupdate -latest-install\e[m" + update -latest-install | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null } _run_update_installer() { @@ -133,9 +133,9 @@ _run_update_installer() { fi elif [[ "${TTY}" == "ttyS0" || "${TTY}" == "ttyAMA0" || "${TTY}" == "ttyUSB0" || "${TTY}" == "pts/0" ]]; then if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2571000 ]]; then - echo -e "Running \e[1m\e[92mupdate-installer -latest-install\e[m on \e[1mtty1\e[m, please wait...\e[m" + echo -e "Running \e[1m\e[92mupdate -latest-install\e[m on \e[1mtty1\e[m, please wait...\e[m" else - echo -e "\e[1mRunning now: \e[92mupdate-installer -latest\e[m" + echo -e "\e[1mRunning now: \e[92mupdate -latest\e[m" fi echo -e "\e[1mProgress is shown here...\e[m" fi diff --git a/usr/lib/archboot/update-installer/gnome-wayland.sh b/usr/lib/archboot/update/gnome-wayland.sh similarity index 100% rename from usr/lib/archboot/update-installer/gnome-wayland.sh rename to usr/lib/archboot/update/gnome-wayland.sh diff --git a/usr/lib/archboot/update-installer/gnome.sh b/usr/lib/archboot/update/gnome.sh similarity index 100% rename from usr/lib/archboot/update-installer/gnome.sh rename to usr/lib/archboot/update/gnome.sh diff --git a/usr/lib/archboot/update-installer/plasma-wayland.sh b/usr/lib/archboot/update/plasma-wayland.sh similarity index 100% rename from usr/lib/archboot/update-installer/plasma-wayland.sh rename to usr/lib/archboot/update/plasma-wayland.sh diff --git a/usr/lib/archboot/update-installer/plasma.sh b/usr/lib/archboot/update/plasma.sh similarity index 100% rename from usr/lib/archboot/update-installer/plasma.sh rename to usr/lib/archboot/update/plasma.sh diff --git a/usr/lib/archboot/update-installer/update-installer.sh b/usr/lib/archboot/update/update-installer.sh similarity index 98% rename from usr/lib/archboot/update-installer/update-installer.sh rename to usr/lib/archboot/update/update-installer.sh index 1736c29ce..ae5d378fd 100644 --- a/usr/lib/archboot/update-installer/update-installer.sh +++ b/usr/lib/archboot/update/update-installer.sh @@ -16,7 +16,7 @@ _INITRD="initrd.img" _INST="/${_LIB}/installer" _HELP="/${_LIB}/installer/help" _RUN="/${_LIB}/run" -_UPDATE="/${_LIB}/update-installer" +_UPDATE="/${_LIB}/update" [[ "${_RUNNING_ARCH}" == "x86_64" || "${_RUNNING_ARCH}" == "riscv64" ]] && _VMLINUZ="vmlinuz-linux" [[ "${_RUNNING_ARCH}" == "aarch64" ]] && _VMLINUZ="Image" @@ -100,7 +100,7 @@ _download_latest() { # helper binaries echo -e "\e[1mStep 2/4:\e[m Downloading latest scripts..." # main binaries - BINS="quickinst setup km tz update-installer copy-mountpoint rsync-backup restore-usbstick" + BINS="quickinst setup km tz update copy-mountpoint rsync-backup restore-usbstick" for i in ${BINS}; do [[ -e "${_BIN}/${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}.sh?inline=false" -O "${_BIN}/${i}" done @@ -119,8 +119,8 @@ _download_latest() { for i in ${LIBS}; do wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}" done - # update-installer libs - LIBS="update-installer.sh xfce.sh gnome.sh gnome-wayland.sh plasma.sh plasma-wayland.sh" + # update libs + LIBS="update.sh xfce.sh gnome.sh gnome-wayland.sh plasma.sh plasma-wayland.sh" for i in ${LIBS}; do wget -q "${_SOURCE}${_UPDATE}/${i}?inline=false" -O "${_UPDATE}/${i}" done @@ -151,10 +151,10 @@ _network_check() { } _update_installer_check() { - if [[ -f /.update-installer ]]; then + if [[ -f /.update ]]; then echo -e "\e[91mAborting:\e[m" - echo "update-installer is already running on other tty..." - echo "If you are absolutly sure it's not running, you need to remove /.update-installer" + echo "update is already running on other tty..." + echo "If you are absolutly sure it's not running, you need to remove /.update" exit 1 fi if ! [[ -e /var/cache/pacman/pkg/archboot.db ]]; then @@ -338,7 +338,7 @@ _prepare_graphic() { _new_environment() { _update_installer_check - touch /.update-installer + touch /.update _kill_w_dir _STEPS="10" _S_APPEND="0" diff --git a/usr/lib/archboot/update-installer/xfce.sh b/usr/lib/archboot/update/xfce.sh similarity index 100% rename from usr/lib/archboot/update-installer/xfce.sh rename to usr/lib/archboot/update/xfce.sh diff --git a/usr/lib/initcpio/install/archboot_installer_common b/usr/lib/initcpio/install/archboot_installer_common index 21bdfb192..4c4702d36 100644 --- a/usr/lib/initcpio/install/archboot_installer_common +++ b/usr/lib/initcpio/install/archboot_installer_common @@ -7,8 +7,8 @@ build () map add_file "/etc/archboot/defaults" "/usr/lib/archboot/common.sh" \ "/usr/lib/archboot/container.sh" "/usr/bin/archboot-$(uname -m)-create-container.sh" \ "/usr/lib/archboot/login.sh" "/usr/lib/archboot/cpio.sh" "/usr/bin/archboot-cpio.sh" - add_full_dir "/usr/lib/archboot/update-installer" - add_file "/usr/bin/archboot-update-installer.sh" "/usr/bin/update-installer" + add_full_dir "/usr/lib/archboot/update" + add_file "/usr/bin/archboot-update.sh" "/usr/bin/update" add_file "/usr/share/archboot/gpg/tpowa.gpg" # use /etc/profile to launch login.sh echo ". /usr/lib/archboot/login.sh" >> ${BUILDROOT}/root/.bashrc diff --git a/usr/lib/initcpio/install/archboot_motd b/usr/lib/initcpio/install/archboot_motd index 06cc22fae..85074625a 100644 --- a/usr/lib/initcpio/install/archboot_motd +++ b/usr/lib/initcpio/install/archboot_motd @@ -29,7 +29,7 @@ if echo "${HOOKS[@]}" | grep -qw archboot_net; then fi if echo "${HOOKS[@]}" | grep -qw archboot_installer; then echo -e "\e[1mManage Archboot Environment:\e[m" >> "${MOTD}" - echo -e " - Use the \e[1;92m'update-installer'\e[m script." >> "${MOTD}" + echo -e " - Use the \e[1;92m'update'\e[m script." >> "${MOTD}" #shellcheck disable=SC2129 echo -e "\e[1mInstallation:\e[m" >> "${MOTD}" echo -e " - Use the \e[92m'setup'\e[m script." >> "${MOTD}"