mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
rename update-installer to simple update
This commit is contained in:
parent
5b2427bbd1
commit
c1187fb8fd
11 changed files with 25 additions and 25 deletions
|
@ -5,12 +5,12 @@
|
||||||
. /usr/lib/archboot/common.sh
|
. /usr/lib/archboot/common.sh
|
||||||
. /usr/lib/archboot/container.sh
|
. /usr/lib/archboot/container.sh
|
||||||
#shellcheck disable=SC1094
|
#shellcheck disable=SC1094
|
||||||
. /usr/lib/archboot/update-installer/update-installer.sh
|
. /usr/lib/archboot/update/update.sh
|
||||||
. /usr/lib/archboot/update-installer/xfce.sh
|
. /usr/lib/archboot/update/xfce.sh
|
||||||
. /usr/lib/archboot/update-installer/gnome.sh
|
. /usr/lib/archboot/update/gnome.sh
|
||||||
. /usr/lib/archboot/update-installer/gnome-wayland.sh
|
. /usr/lib/archboot/update/gnome-wayland.sh
|
||||||
. /usr/lib/archboot/update-installer/plasma.sh
|
. /usr/lib/archboot/update/plasma.sh
|
||||||
. /usr/lib/archboot/update-installer/plasma-wayland.sh
|
. /usr/lib/archboot/update/plasma-wayland.sh
|
||||||
[[ -z "${1}" ]] && usage
|
[[ -z "${1}" ]] && usage
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
case ${1} in
|
case ${1} in
|
|
@ -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[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[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[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"
|
echo -e "\e[1mRunning now: \e[92mupdate -latest-install\e[m"
|
||||||
update-installer -latest-install
|
update -latest-install
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -94,14 +94,14 @@ _enter_shell() {
|
||||||
|
|
||||||
_run_latest() {
|
_run_latest() {
|
||||||
echo -e "\e[1mStarting\e[m assembling of archboot environment \e[1mwithout\e[m package cache..."
|
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"
|
echo -e "\e[1mRunning now: \e[92mupdate -latest\e[m"
|
||||||
update-installer -latest | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
|
update -latest | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
_run_latest_install() {
|
_run_latest_install() {
|
||||||
echo -e "\e[1mStarting\e[m assembling of archboot environment \e[1mwith\e[m package cache..."
|
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"
|
echo -e "\e[1mRunning now: \e[92mupdate -latest-install\e[m"
|
||||||
update-installer -latest-install | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
|
update -latest-install | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
_run_update_installer() {
|
_run_update_installer() {
|
||||||
|
@ -133,9 +133,9 @@ _run_update_installer() {
|
||||||
fi
|
fi
|
||||||
elif [[ "${TTY}" == "ttyS0" || "${TTY}" == "ttyAMA0" || "${TTY}" == "ttyUSB0" || "${TTY}" == "pts/0" ]]; then
|
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
|
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
|
else
|
||||||
echo -e "\e[1mRunning now: \e[92mupdate-installer -latest\e[m"
|
echo -e "\e[1mRunning now: \e[92mupdate -latest\e[m"
|
||||||
fi
|
fi
|
||||||
echo -e "\e[1mProgress is shown here...\e[m"
|
echo -e "\e[1mProgress is shown here...\e[m"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -16,7 +16,7 @@ _INITRD="initrd.img"
|
||||||
_INST="/${_LIB}/installer"
|
_INST="/${_LIB}/installer"
|
||||||
_HELP="/${_LIB}/installer/help"
|
_HELP="/${_LIB}/installer/help"
|
||||||
_RUN="/${_LIB}/run"
|
_RUN="/${_LIB}/run"
|
||||||
_UPDATE="/${_LIB}/update-installer"
|
_UPDATE="/${_LIB}/update"
|
||||||
[[ "${_RUNNING_ARCH}" == "x86_64" || "${_RUNNING_ARCH}" == "riscv64" ]] && _VMLINUZ="vmlinuz-linux"
|
[[ "${_RUNNING_ARCH}" == "x86_64" || "${_RUNNING_ARCH}" == "riscv64" ]] && _VMLINUZ="vmlinuz-linux"
|
||||||
[[ "${_RUNNING_ARCH}" == "aarch64" ]] && _VMLINUZ="Image"
|
[[ "${_RUNNING_ARCH}" == "aarch64" ]] && _VMLINUZ="Image"
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ _download_latest() {
|
||||||
# helper binaries
|
# helper binaries
|
||||||
echo -e "\e[1mStep 2/4:\e[m Downloading latest scripts..."
|
echo -e "\e[1mStep 2/4:\e[m Downloading latest scripts..."
|
||||||
# main binaries
|
# 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
|
for i in ${BINS}; do
|
||||||
[[ -e "${_BIN}/${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}.sh?inline=false" -O "${_BIN}/${i}"
|
[[ -e "${_BIN}/${i}" ]] && wget -q "${_SOURCE}${_BIN}/archboot-${i}.sh?inline=false" -O "${_BIN}/${i}"
|
||||||
done
|
done
|
||||||
|
@ -119,8 +119,8 @@ _download_latest() {
|
||||||
for i in ${LIBS}; do
|
for i in ${LIBS}; do
|
||||||
wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}"
|
wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}"
|
||||||
done
|
done
|
||||||
# update-installer libs
|
# update libs
|
||||||
LIBS="update-installer.sh xfce.sh gnome.sh gnome-wayland.sh plasma.sh plasma-wayland.sh"
|
LIBS="update.sh xfce.sh gnome.sh gnome-wayland.sh plasma.sh plasma-wayland.sh"
|
||||||
for i in ${LIBS}; do
|
for i in ${LIBS}; do
|
||||||
wget -q "${_SOURCE}${_UPDATE}/${i}?inline=false" -O "${_UPDATE}/${i}"
|
wget -q "${_SOURCE}${_UPDATE}/${i}?inline=false" -O "${_UPDATE}/${i}"
|
||||||
done
|
done
|
||||||
|
@ -151,10 +151,10 @@ _network_check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_update_installer_check() {
|
_update_installer_check() {
|
||||||
if [[ -f /.update-installer ]]; then
|
if [[ -f /.update ]]; then
|
||||||
echo -e "\e[91mAborting:\e[m"
|
echo -e "\e[91mAborting:\e[m"
|
||||||
echo "update-installer is already running on other tty..."
|
echo "update is already running on other tty..."
|
||||||
echo "If you are absolutly sure it's not running, you need to remove /.update-installer"
|
echo "If you are absolutly sure it's not running, you need to remove /.update"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! [[ -e /var/cache/pacman/pkg/archboot.db ]]; then
|
if ! [[ -e /var/cache/pacman/pkg/archboot.db ]]; then
|
||||||
|
@ -338,7 +338,7 @@ _prepare_graphic() {
|
||||||
|
|
||||||
_new_environment() {
|
_new_environment() {
|
||||||
_update_installer_check
|
_update_installer_check
|
||||||
touch /.update-installer
|
touch /.update
|
||||||
_kill_w_dir
|
_kill_w_dir
|
||||||
_STEPS="10"
|
_STEPS="10"
|
||||||
_S_APPEND="0"
|
_S_APPEND="0"
|
|
@ -7,8 +7,8 @@ build ()
|
||||||
map add_file "/etc/archboot/defaults" "/usr/lib/archboot/common.sh" \
|
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/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"
|
"/usr/lib/archboot/login.sh" "/usr/lib/archboot/cpio.sh" "/usr/bin/archboot-cpio.sh"
|
||||||
add_full_dir "/usr/lib/archboot/update-installer"
|
add_full_dir "/usr/lib/archboot/update"
|
||||||
add_file "/usr/bin/archboot-update-installer.sh" "/usr/bin/update-installer"
|
add_file "/usr/bin/archboot-update.sh" "/usr/bin/update"
|
||||||
add_file "/usr/share/archboot/gpg/tpowa.gpg"
|
add_file "/usr/share/archboot/gpg/tpowa.gpg"
|
||||||
# use /etc/profile to launch login.sh
|
# use /etc/profile to launch login.sh
|
||||||
echo ". /usr/lib/archboot/login.sh" >> ${BUILDROOT}/root/.bashrc
|
echo ". /usr/lib/archboot/login.sh" >> ${BUILDROOT}/root/.bashrc
|
||||||
|
|
|
@ -29,7 +29,7 @@ if echo "${HOOKS[@]}" | grep -qw archboot_net; then
|
||||||
fi
|
fi
|
||||||
if echo "${HOOKS[@]}" | grep -qw archboot_installer; then
|
if echo "${HOOKS[@]}" | grep -qw archboot_installer; then
|
||||||
echo -e "\e[1mManage Archboot Environment:\e[m" >> "${MOTD}"
|
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
|
#shellcheck disable=SC2129
|
||||||
echo -e "\e[1mInstallation:\e[m" >> "${MOTD}"
|
echo -e "\e[1mInstallation:\e[m" >> "${MOTD}"
|
||||||
echo -e " - Use the \e[92m'setup'\e[m script." >> "${MOTD}"
|
echo -e " - Use the \e[92m'setup'\e[m script." >> "${MOTD}"
|
||||||
|
|
Loading…
Reference in a new issue