#! /bin/bash
#Configuring IBMIM path
read -p "Use default IBMIM path? [/opt/IBM/InstallationManager] ? y/n " imRsp
if [ "$imRsp" != "y" ]; then
read -p "Enter the IBMIM path: " imPath
else
imPath="/opt/IBM/InstallationManager"
fi
read -p "Enter the package directory: " pathFix
#List available package form repository.config file
for x in `$imPath/eclipse/tools/imcl -acceptLicense listAvailablePackages -repositories $pathFix/repository.config`; do
echo "Package "$x
#Question if it is desired to install the found package
read -p "Install package $x ? y/n: " rsp
if [ "$rsp" == "y" ]; then
#Deploying package
echo "Installation of" $x "started..."
$imPath/eclipse/tools/imcl -acceptLicense install $x -repositories $pathFix/repository.config
fi
done
#Show all package installed on the host
echo "Packages currently installed: "
$imPath/eclipse/tools/imcl -acceptLicense listInstalledPackages