From 10517de84e91972db74b7e401ad95742305a5904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Fri, 8 May 2026 10:48:48 +0200 Subject: [PATCH] Obsolete client_software/install.sh --- system_setup/sync_client_software.sh | 35 +++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/system_setup/sync_client_software.sh b/system_setup/sync_client_software.sh index 098c2df..bf19ba3 100755 --- a/system_setup/sync_client_software.sh +++ b/system_setup/sync_client_software.sh @@ -165,13 +165,36 @@ else find ${CLIENT_SOFTWARE_DST} -type f -name install.sh -exec chmod ugo+x {} \; #Run Software setup - echo "Running Setup of Software" - if [ $1 == "install" ]; then - ${CLIENT_SOFTWARE_DST}/install.sh $2 - if [ $? -ne 0 ]; then - exit 1 + echo "Running all software scripts in admin- context." + for DIR in $(ls -d ${CLIENT_SOFTWARE_DST}/*/ | sort); # list directories in the form "/tmp/dirname/" + do + DIR=${DIR%*/} # remove the trailing "/" + if [[ "$1." != "." ]] && [[ "${DIR}" != *"$1"* ]]; then + #search for string in dir + echo "Skipping ${DIR} while not in search parameter ( $1 )." + continue fi - fi + if [ -f "${DIR}/install.sh" ]; then + echo " ====================" + echo " >>> Running ${DIR}/install.sh" + cd ${DIR} + ${DIR}/install.sh + if [ $? -ne 0 ]; then + echo " ====================" + echo "Some Error in script, will not continue. Please check." + echo "Press any key to continue." + read -n 1 -s -r + exit 1 + fi + echo " ====================" + fi + done + + #Last, remove unused Flatpak- Runtimes and unused Data + echo "Removing unused Flatpak- Data." + flatpak uninstall --unused -y + + echo "Sucessfully installed software." fi echo "" exit 0