New customer software repository and small fixes #30
@@ -165,13 +165,36 @@ else
|
|||||||
find ${CLIENT_SOFTWARE_DST} -type f -name install.sh -exec chmod ugo+x {} \;
|
find ${CLIENT_SOFTWARE_DST} -type f -name install.sh -exec chmod ugo+x {} \;
|
||||||
|
|
||||||
#Run Software setup
|
#Run Software setup
|
||||||
echo "Running Setup of Software"
|
echo "Running all software scripts in admin- context."
|
||||||
if [ $1 == "install" ]; then
|
for DIR in $(ls -d ${CLIENT_SOFTWARE_DST}/*/ | sort); # list directories in the form "/tmp/dirname/"
|
||||||
${CLIENT_SOFTWARE_DST}/install.sh $2
|
do
|
||||||
if [ $? -ne 0 ]; then
|
DIR=${DIR%*/} # remove the trailing "/"
|
||||||
exit 1
|
if [[ "$1." != "." ]] && [[ "${DIR}" != *"$1"* ]]; then
|
||||||
|
#search for string in dir
|
||||||
|
echo "Skipping ${DIR} while not in search parameter ( $1 )."
|
||||||
|
continue
|
||||||
fi
|
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
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user