From d73575ea8b87373750d0cf9a694a4fc1fba59477 Mon Sep 17 00:00:00 2001 From: committer Date: Sat, 8 Jun 2024 14:50:43 -0500 Subject: [PATCH] + added support for common packages --- dots/archinstall/common/packages.txt | 0 scripts/99_software.sh | 23 ++++++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 dots/archinstall/common/packages.txt diff --git a/dots/archinstall/common/packages.txt b/dots/archinstall/common/packages.txt new file mode 100644 index 0000000..e69de29 diff --git a/scripts/99_software.sh b/scripts/99_software.sh index fcae51e..80a86eb 100644 --- a/scripts/99_software.sh +++ b/scripts/99_software.sh @@ -43,14 +43,12 @@ pacman -Syu # update install packages echo "-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-" -# ----- -# update all packages for given host -# ----- -if [ ${operation} == "update" ] ; then +do_update() { + hostname=$1 - param_check "${parameter}" "no host name given" + param_check "${hostname}" "no host name given" - package_list_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${parameter}/packages.txt + package_list_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${hostname}/packages.txt trg_file=/tmp/packages.txt @@ -64,7 +62,7 @@ if [ ${operation} == "update" ] ; then echo "" echo "attempted to to download 'packages.txt' from: echo '${package_list_url}'" - echo "'${parameter}' might be an invalid hostname, or 'packages.txt' might be missing for given host." + echo "'${hostname}' might be an invalid hostname, or 'packages.txt' might be missing for given host." exit 1 fi @@ -115,6 +113,17 @@ if [ ${operation} == "update" ] ; then echo "No AUR packages to install" fi +} + + +# ----- +# update all packages for given host +# ----- +if [ ${operation} == "update" ] ; then + + do_update("common") + do_update(${parameter}) + fi # -----