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 # -----