Merge pull request #367 from sinthuja/test-merge

Fixes for profile creator for windows.
application-manager-new
Amal Gunatilake 8 years ago committed by GitHub
commit 1e0c018d95

@ -0,0 +1,318 @@
@echo OFF
REM ---------------------------------------------------------------------------
REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM ---------------------------------------------------------------------------
REM Profile creator tool for EI
REM ---------------------------------------------------------------------------
set DIR=%~dp0
set DISTRIBUTION=wso2iot-@product.version@
REM get the desired profile
echo This tool will erase all the files which are not required for the selected profile
echo and provide you a light weight package for the target profile.
echo WSO2 IoT Server Supports following profiles.
echo 1.IoT Gateway Profile
echo 2.IoT Key Manager Profile
echo 3.IoT Device Backend Profile
echo 4.IoT Device Manager Profile
echo 5.Analytics Profile
echo 6.Broker profile
echo 7.For All Profiles
set /p profileNumber= [Please enter the desired profile number to create the profile specific distribution]
IF /I "%profileNumber%" EQU "1" goto Gateway
IF /I "%profileNumber%" EQU "2" goto KeyManager
IF /I "%profileNumber%" EQU "3" goto Backend
IF /I "%profileNumber%" EQU "4" goto Manager
IF /I "%profileNumber%" EQU "5" goto Analytics
IF /I "%profileNumber%" EQU "6" goto Broker
IF /I "%profileNumber%" EQU "7" goto All
echo Invalid profile identifier.
:COPY_DIST
set TEMPDIR=%DIR%..\..\target
IF NOT EXIST %TEMPDIR% mkdir %TEMPDIR%
IF EXIST %TEMPDIR%\%DISTRIBUTION% @RD /S /Q %TEMPDIR%\%DISTRIBUTION%
IF EXIST %TEMPDIR%\%DISTRIBUTION%%PROFILE% @RD /S /Q %TEMPDIR%\%DISTRIBUTION%%PROFILE%
xcopy %DIR%..\..\%DISTRIBUTION% %TEMPDIR%\%DISTRIBUTION%\ /s /e /h
set DIR=%TEMPDIR%\%DISTRIBUTION%\bin\
goto :eof
:Gateway
echo Preparing the Gateway profile distribution.
SET PROFILE=_gateway
call :COPY_DIST
set DEFAULT_BUNDLES=%DIR%..\wso2\components\http-gateway\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
call :Remove_BROKER
call :Remove_ANALYTICS
call :Remove_JARS
IF EXIST %DIR%..\wso2\components\default @RD /S /Q %DIR%..\wso2\components\default
IF EXIST %DIR%..\wso2\components\device-backend @RD /S /Q %DIR%..\wso2\components\device-backend
IF EXIST %DIR%..\wso2\components\device-key-manager @RD /S /Q %DIR%..\wso2\components\device-key-manager
IF EXIST %DIR%..\wso2\components\device-manager @RD /S /Q %DIR%..\wso2\components\device-manager
IF EXIST %DIR%..\samples @RD /S /Q %DIR%..\samples
IF EXIST %DIR%..\plugins @RD /S /Q %DIR%..\plugins
for /R %DIR%..\repository\resources\profiles\gateway %%f in (*.sh) do copy %%f %DIR%..\bin\
for /R %DIR%..\repository\resources\profiles\gateway %%f in (*.bat) do copy %%f %DIR%..\bin\
copy /y %DIR%..\repository\resources\profiles\gateway\carbon.xml %DIR%..\conf\
IF EXIST %DIR%..\repository\deployment\server\jaggeryapps @RD /S /Q %DIR%..\repository\deployment\server\jaggeryapps
IF EXIST %DIR%..\repository\deployment\server\webapps @RD /S /Q %DIR%..\repository\deployment\server\webapps
IF EXIST %DIR%..\repository\deployment\server\carbonapps @RD /S /Q %DIR%..\repository\deployment\server\carbonapps
IF EXIST %DIR%..\repository\deployment\server\axis2services @RD /S /Q %DIR%..\repository\deployment\server\axis2services
IF EXIST %DIR%..\repository\deployment\server\devicetypes @RD /S /Q %DIR%..\repository\deployment\server\devicetypes
mkdir %DIR%..\repository\deployment\server\jaggeryapps
mkdir %DIR%..\repository\deployment\server\webapps
mkdir %DIR%..\repository\deployment\server\carbonapps
mkdir %DIR%..\repository\deployment\server\axis2services
mkdir %DIR%..\repository\deployment\server\devicetypes
IF EXIST %DIR%..\conf\identity\sso-idp-config.xml del %DIR%..\conf\identity\sso-idp-config.xml
call :RENAME_DIST
echo Gateway profile created successfully in %TEMPDIR%\%DISTRIBUTION%%PROFILE%.
goto Exit
:KeyManager
echo Preparing the KeyManager profile distribution.
SET PROFILE=_keymanager
call :COPY_DIST
set DEFAULT_BUNDLES=%DIR%..\wso2\components\device-key-manager\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
call :Remove_BROKER
call :Remove_ANALYTICS
call :Remove_JARS
IF EXIST %DIR%..\wso2\components\default @RD /S /Q %DIR%..\wso2\components\default
IF EXIST %DIR%..\wso2\components\http-gateway @RD /S /Q %DIR%..\wso2\components\http-gateway
IF EXIST %DIR%..\wso2\components\device-backend @RD /S /Q %DIR%..\wso2\components\device-backend
IF EXIST %DIR%..\wso2\components\device-manager @RD /S /Q %DIR%..\wso2\components\device-manager
IF EXIST %DIR%..\samples @RD /S /Q %DIR%..\samples
IF EXIST %DIR%..\plugins @RD /S /Q %DIR%..\plugins
for /R %DIR%..\repository\resources\profiles\keymanager %%f in (*.sh) do copy %%f %DIR%..\bin\
for /R %DIR%..\repository\resources\profiles\keymanager %%f in (*.bat) do copy %%f %DIR%..\bin\
copy /y %DIR%..\repository\resources\profiles\keymanager\carbon.xml %DIR%..\conf\
copy /y %DIR%..\repository\resources\profiles\keymanager\identity\application-authentication.xml %DIR%..\conf\identity\
IF EXIST %DIR%..\repository\deployment\server\jaggeryapps @RD /S /Q %DIR%..\repository\deployment\server\jaggeryapps
IF EXIST %DIR%..\repository\deployment\server\carbonapps @RD /S /Q %DIR%..\repository\deployment\server\carbonapps
IF EXIST %DIR%..\repository\deployment\server\axis2services @RD /S /Q %DIR%..\repository\deployment\server\axis2services
IF EXIST %DIR%..\repository\deployment\server\devicetypes @RD /S /Q %DIR%..\repository\deployment\server\devicetypes
IF EXIST %DIR%..\repository\deployment\server\synapse-configs\default\api @RD /S /Q %DIR%..\repository\deployment\server\synapse-configs\default\api
del /s /q /f %DIR%..\repository\deployment\server\synapse-configs\default\sequences\_*.xml
mkdir %DIR%..\repository\deployment\server\tempwebapp
copy /y %DIR%..\repository\deployment\server\webapps\oauth2.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\client-registration#v0.11.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\dynamic-client-web.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\authenticationendpoint.war %DIR%..\repository\deployment\server\tempwebapp\
IF EXIST %DIR%..\repository\deployment\server\webapps @RD /S /Q %DIR%..\repository\deployment\server\webapps
mkdir %DIR%..\repository\deployment\server\jaggeryapps
mkdir %DIR%..\repository\deployment\server\carbonapps
mkdir %DIR%..\repository\deployment\server\axis2services
mkdir %DIR%..\repository\deployment\server\devicetypes
mkdir %DIR%..\repository\deployment\server\webapps
mkdir %DIR%..\repository\deployment\server\synapse-configs\default\api
for /R %DIR%..\repository\deployment\server\tempwebapp %%f in (*.war) do copy %%f %DIR%..\repository\deployment\server\webapps\
IF EXIST %DIR%..\repository\deployment\server\tempwebapp @RD /S /Q %DIR%..\repository\deployment\server\tempwebapp
IF EXIST %DIR%start-all.bat del %DIR%start-all.bat
IF EXIST %DIR%start-all.sh del %DIR%start-all.sh
IF EXIST %DIR%stop-all.bat del %DIR%stop-all.bat
IF EXIST %DIR%stop-all.sh del %DIR%stop-all.sh
call :RENAME_DIST
echo Key Manager profile created successfully in %TEMPDIR%\%DISTRIBUTION%%PROFILE%.
goto Exit
:Backend
echo Preparing the Device Backend profile distribution.
SET PROFILE=_device-backend
call :COPY_DIST
set DEFAULT_BUNDLES=%DIR%..\wso2\components\device-backend\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
call :Remove_BROKER
call :Remove_ANALYTICS
call :Remove_JARS
IF EXIST %DIR%..\wso2\components\default @RD /S /Q %DIR%..\wso2\components\default
IF EXIST %DIR%..\wso2\components\http-gateway @RD /S /Q %DIR%..\wso2\components\http-gateway
IF EXIST %DIR%..\wso2\components\device-key-manager @RD /S /Q %DIR%..\wso2\components\device-key-manager
IF EXIST %DIR%..\wso2\components\device-manager @RD /S /Q %DIR%..\wso2\components\device-manager
IF EXIST %DIR%..\samples @RD /S /Q %DIR%..\samples
IF EXIST %DIR%..\plugins @RD /S /Q %DIR%..\plugins
for /R %DIR%..\repository\resources\profiles\backend %%f in (*.sh) do copy %%f %DIR%..\bin\
for /R %DIR%..\repository\resources\profiles\backend %%f in (*.bat) do copy %%f %DIR%..\bin\
copy /y %DIR%..\repository\resources\profiles\backend\carbon.xml %DIR%..\conf\
IF EXIST %DIR%..\repository\deployment\server\synapse-configs\default\api @RD /S /Q %DIR%..\repository\deployment\server\synapse-configs\default\api
del /s /q /f %DIR%..\repository\deployment\server\synapse-configs\default\sequences\_*.xml
IF EXIST %DIR%..\repository\deployment\server\jaggeryapps @RD /S /Q %DIR%..\repository\deployment\server\jaggeryapps
IF EXIST %DIR%..\repository\deployment\server\axis2services @RD /S /Q %DIR%..\repository\deployment\server\axis2services
IF EXIST %DIR%..\repository\deployment\server\webapps\shindig.war del %DIR%..\repository\deployment\server\webapps\shindig.war
IF EXIST %DIR%..\repository\deployment\server\webapps\api#am#publisher#v0.11.war del %DIR%..\repository\deployment\server\webapps\api#am#publisher#v0.11.war
IF EXIST %DIR%..\repository\deployment\server\webapps\api#am#store#v0.11.war del %DIR%..\repository\deployment\server\webapps\api#am#store#v0.11.war
IF EXIST %DIR%..\repository\deployment\server\webapps\api#appm#oauth#v1.0.war del %DIR%..\repository\deployment\server\webapps\api#appm#oauth#v1.0.war
IF EXIST %DIR%..\repository\deployment\server\webapps\api#appm#publisher#v1.1.war del %DIR%..\repository\deployment\server\webapps\api#appm#publisher#v1.1.war
IF EXIST %DIR%..\repository\deployment\server\webapps\api#appm#store#v1.1.war del %DIR%..\repository\deployment\server\webapps\api#appm#store#v1.1.war
IF EXIST %DIR%..\repository\deployment\server\webapps\dynamic-client-web.war del %DIR%..\repository\deployment\server\webapps\dynamic-client-web.war
IF EXIST %DIR%..\repository\deployment\server\webapps\client-registration#v0.11.war del %DIR%..\repository\deployment\server\webapps\client-registration#v0.11.war
mkdir %DIR%..\repository\deployment\server\jaggeryapps
mkdir %DIR%..\repository\deployment\server\axis2services
mkdir %DIR%..\repository\deployment\server\synapse-configs\default\api
IF EXIST %DIR%..\conf\identity\sso-idp-config.xml del %DIR%..\conf\identity\sso-idp-config.xml
IF EXIST %DIR%start-all.bat del %DIR%start-all.bat
IF EXIST %DIR%start-all.sh del %DIR%start-all.sh
IF EXIST %DIR%stop-all.bat del %DIR%stop-all.bat
IF EXIST %DIR%stop-all.sh del %DIR%stop-all.sh
call :RENAME_DIST
echo Device Backend profile created successfully in %TEMPDIR%\%DISTRIBUTION%%PROFILE%.
goto Exit
:Manager
echo Preparing the Gateway profile distribution.
SET PROFILE=_device-manager
call :COPY_DIST
set DEFAULT_BUNDLES=%DIR%..\wso2\components\device-manager\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
call :Remove_BROKER
call :Remove_ANALYTICS
call :Remove_JARS
IF EXIST %DIR%..\wso2\components\default @RD /S /Q %DIR%..\wso2\components\default
IF EXIST %DIR%..\wso2\components\http-gateway @RD /S /Q %DIR%..\wso2\components\http-gateway
IF EXIST %DIR%..\wso2\components\device-key-manager @RD /S /Q %DIR%..\wso2\components\device-key-manager
IF EXIST %DIR%..\wso2\components\device-backend @RD /S /Q %DIR%..\wso2\components\device-backend
IF EXIST %DIR%..\samples @RD /S /Q %DIR%..\samples
IF EXIST %DIR%..\plugins @RD /S /Q %DIR%..\plugins
for /R %DIR%..\repository\resources\profiles\manager %%f in (*.sh) do copy %%f %DIR%..\bin\
for /R %DIR%..\repository\resources\profiles\manager %%f in (*.bat) do copy %%f %DIR%..\bin\
copy /y %DIR%..\repository\resources\profiles\manager\carbon.xml %DIR%..\conf\
IF EXIST %DIR%..\repository\deployment\server\synapse-configs\default\api @RD /S /Q %DIR%..\repository\deployment\server\synapse-configs\default\api
del /s /q /f %DIR%..\repository\deployment\server\synapse-configs\default\sequences\_*.xml
mkdir %DIR%..\repository\deployment\server\tempwebapp
copy /y %DIR%..\repository\deployment\server\webapps\api#am#publisher#v0.11.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\api#am#store#v0.11.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\api#appm#oauth#v1.0.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\api#appm#publisher#v1.1.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\api#appm#store#v1.1.war %DIR%..\repository\deployment\server\tempwebapp\
copy /y %DIR%..\repository\deployment\server\webapps\shindig.war %DIR%..\repository\deployment\server\tempwebapp\
IF EXIST %DIR%..\repository\deployment\server\webapps @RD /S /Q %DIR%..\repository\deployment\server\webapps
IF EXIST %DIR%..\repository\deployment\server\axis2services @RD /S /Q %DIR%..\repository\deployment\server\axis2services
mkdir %DIR%..\repository\deployment\server\axis2services
mkdir %DIR%..\repository\deployment\server\synapse-configs\default\api
mkdir %DIR%..\repository\deployment\server\webapps
for /R %DIR%..\repository\deployment\server\tempwebapp %%f in (*.war) do copy %%f %DIR%..\repository\deployment\server\webapps\
IF EXIST %DIR%..\conf\identity\sso-idp-config.xml del %DIR%..\conf\identity\sso-idp-config.xml
IF EXIST %DIR%..\repository\deployment\server\tempwebapp @RD /S /Q %DIR%..\repository\deployment\server\tempwebapp
IF EXIST %DIR%start-all.bat del %DIR%start-all.bat
IF EXIST %DIR%start-all.sh del %DIR%start-all.sh
IF EXIST %DIR%stop-all.bat del %DIR%stop-all.bat
IF EXIST %DIR%stop-all.sh del %DIR%stop-all.sh
call :RENAME_DIST
echo Device Manager profile created successfully in %TEMPDIR%\%DISTRIBUTION%%PROFILE%.
goto Exit
:Analytics
echo Preparing the Analytics profile.
SET PROFILE=_analytics
call :COPY_DIST
set DEFAULT_BUNDLES=%DIR%..\wso2\components\analytics-default\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
call :Remove_IoT
call :Remove_BROKER
call :Remove_JARS
call :RENAME_DIST
echo Analytics profile created successfully in %TEMPDIR%\%DISTRIBUTION%%PROFILE%.
goto Exit
:Broker
echo Preparing the Broker profile.
SET PROFILE=_broker
call :COPY_DIST
set DEFAULT_BUNDLES=%DIR%..\wso2\components\broker-default\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info
call :Remove_IOT
call :Remove_ANALYTICS
call :Remove_JARS
call :RENAME_DIST
echo Broker profile created successfully in %TEMPDIR%\%DISTRIBUTION%%PROFILE%.
goto Exit
:All
echo Creating all profiles in IoT distribution
call :Gateway
call :KeyManager
call :Backend
call :Manager
call :Analytics
call :Broker
echo All profiles are created successfully in %TEMPDIR%.
goto :eof
:Remove_BROKER
echo Removing Broker profile
IF EXIST %DIR%..\wso2\broker @RD /S /Q %DIR%..\wso2\broker
IF EXIST %DIR%..\wso2\components\broker-default @RD /S /Q %DIR%..\wso2\components\broker-default
IF EXIST %DIR%broker.bat del %DIR%broker.bat
IF EXIST %DIR%broker.sh del %DIR%broker.sh
goto :eof
:Remove_ANALYTICS
echo Removing Analytics profile
IF EXIST %DIR%..\wso2\analytics @RD /S /Q %DIR%..\wso2\analytics
IF EXIST %DIR%..\wso2\components\analytics-default @RD /S /Q %DIR%..\wso2\components\analytics-default
IF EXIST %DIR%..\wso2\components\analytics-worker @RD /S /Q %DIR%..\wso2\components\analytics-worker
IF EXIST %DIR%analytics.bat del %DIR%analytics.bat
IF EXIST %DIR%analytics.sh del %DIR%analytics.sh
goto :eof
:Remove_IoT
echo Removing IoT profile
IF EXIST %DIR%..\conf @RD /S /Q %DIR%..\conf
IF EXIST %DIR%..\wso2\components\default @RD /S /Q %DIR%..\wso2\components\default
IF EXIST %DIR%..\wso2\components\device-manager @RD /S /Q %DIR%..\wso2\components\device-manager
IF EXIST %DIR%..\wso2\components\device-key-manager @RD /S /Q %DIR%..\wso2\components\device-key-manager
IF EXIST %DIR%..\wso2\components\device-backend @RD /S /Q %DIR%..\wso2\components\device-backend
IF EXIST %DIR%..\wso2\components\http-gateway @RD /S /Q %DIR%..\wso2\components\http-gateway
IF EXIST %DIR%..\samples @RD /S /Q %DIR%..\samples
IF EXIST %DIR%..\modules @RD /S /Q %DIR%..\modules
IF EXIST %DIR%..\dbscripts @RD /S /Q %DIR%..\dbscripts
IF EXIST %DIR%..\plugins @RD /S /Q %DIR%..\plugins
IF EXIST %DIR%..\repository @RD /S /Q %DIR%..\repository
IF EXIST %DIR%..\tmp @RD /S /Q %DIR%..\tmp
IF EXIST %DIR%..\resources @RD /S /Q %DIR%..\resources
IF EXIST %DIR%iot-server.bat del %DIR%iot-server.bat
IF EXIST %DIR%iot-server.sh del %DIR%iot-server.sh
IF EXIST %DIR%carbondump.bat del %DIR%carbondump.bat
IF EXIST %DIR%carbondump.sh del %DIR%carbondump.sh
IF EXIST %DIR%chpasswd.bat del %DIR%chpasswd.bat
IF EXIST %DIR%chpasswd.sh del %DIR%chpasswd.sh
IF EXIST %DIR%ciphertool.bat del %DIR%ciphertool.bat
IF EXIST %DIR%ciphertool.sh del %DIR%ciphertool.sh
IF EXIST %DIR%start-all.bat del %DIR%start-all.bat
IF EXIST %DIR%start-all.sh del %DIR%start-all.sh
IF EXIST %DIR%stop-all.bat del %DIR%stop-all.bat
IF EXIST %DIR%stop-all.sh del %DIR%stop-all.sh
goto :eof
:Remove_JARS
echo Removing unnecessary jars
mkdir %DIR%..\wso2\components\tmp_plugins
FOR /F "tokens=1,2* delims=, " %%i in (%DEFAULT_BUNDLES%) do copy %DIR%..\wso2\components\plugins\%%i_%%j.jar %DIR%..\wso2\components\tmp_plugins
@RD /S /Q %DIR%..\wso2\components\plugins
rename %DIR%..\wso2\components\tmp_plugins plugins
goto :eof
:RENAME_DIST
rename %TEMPDIR%\%DISTRIBUTION% %DISTRIBUTION%%PROFILE%
SET DIR=%TEMPDIR%\%DISTRIBUTION%%PROFILE%\bin\
del /f %DIR%profile-creator.sh
del /f %DIR%profile-creator.bat
goto :eof
:Exit
set DIR=%~dp0
pause

@ -28,7 +28,6 @@ BINDIR=$(pwd)
#get the desired profile #get the desired profile
echo "This tool will erase all the files which are not required for the selected profile " echo "This tool will erase all the files which are not required for the selected profile "
echo "and also creates a distribution of this profile in the same folder <IOT_HOME> resides." echo "and also creates a distribution of this profile in the same folder <IOT_HOME> resides."
echo "WARNING:This may cause loss of any changes to the other profiles."
echo "WSO2 IoT Server Supports following profiles." echo "WSO2 IoT Server Supports following profiles."
echo " 1.IoT Gateway Profile" echo " 1.IoT Gateway Profile"
echo " 2.IoT Key Manager Profile" echo " 2.IoT Key Manager Profile"
@ -43,13 +42,14 @@ read profileNumber
create_profile(){ create_profile(){
echo "Creating profile - "${profileNumber} echo "Creating profile - "${profileNumber}
if [ "$profileNumber" -lt 7 ] && [ "$profileNumber" -gt 0 ] ; then if [ "$profileNumber" -lt 7 ] && [ "$profileNumber" -gt 0 ] ; then
TEMPDIR=${DIR}/../../tmp TEMPDIR=${DIR}/../../target
if [ ! -d "$TEMPDIR" ]; then if [ ! -d "$TEMPDIR" ]; then
echo "Creating temporary directory" echo "Creating temporary directory"
mkdir ${TEMPDIR} mkdir ${TEMPDIR}
fi fi
rm -rf ${TEMPDIR}/${DISTRIBUTION}
echo "Copying the distribution to the temporary directory" echo "Copying the distribution to the temporary directory"
cp -rf ${DIR}/../../${DISTRIBUTION} ${TEMPDIR}/ cp -rf ${DIR}/../../${DISTRIBUTION} ${TEMPDIR}/
DIR=${TEMPDIR}/${DISTRIBUTION}/bin DIR=${TEMPDIR}/${DISTRIBUTION}/bin
@ -82,6 +82,7 @@ then
rm -rf ${DIR}/profile-creator.sh rm -rf ${DIR}/profile-creator.sh
rm -rf ${DIR}/profile-creator.bat rm -rf ${DIR}/profile-creator.bat
cp -rf ${DIR}/../repository/resources/profiles/gateway/*.sh ${DIR}/../bin/ cp -rf ${DIR}/../repository/resources/profiles/gateway/*.sh ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/gateway/*.bat ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/gateway/carbon.xml ${DIR}/../conf/ cp -rf ${DIR}/../repository/resources/profiles/gateway/carbon.xml ${DIR}/../conf/
rm -rf ${DIR}/../repository/deployment/server/jaggeryapps/* rm -rf ${DIR}/../repository/deployment/server/jaggeryapps/*
rm -rf ${DIR}/../repository/deployment/server/webapps/* rm -rf ${DIR}/../repository/deployment/server/webapps/*
@ -119,6 +120,7 @@ then
rm -rf ${DIR}/profile-creator.sh rm -rf ${DIR}/profile-creator.sh
rm -rf ${DIR}/profile-creator.bat rm -rf ${DIR}/profile-creator.bat
cp -rf ${DIR}/../repository/resources/profiles/keymanager/*.sh ${DIR}/../bin/ cp -rf ${DIR}/../repository/resources/profiles/keymanager/*.sh ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/keymanager/*.bat ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/keymanager/carbon.xml ${DIR}/../conf/ cp -rf ${DIR}/../repository/resources/profiles/keymanager/carbon.xml ${DIR}/../conf/
cp -rf ${DIR}/../repository/resources/profiles/keymanager/identity/application-authentication.xml ${DIR}/../conf/identity/ cp -rf ${DIR}/../repository/resources/profiles/keymanager/identity/application-authentication.xml ${DIR}/../conf/identity/
rm -rf ${DIR}/../repository/deployment/server/jaggeryapps/* rm -rf ${DIR}/../repository/deployment/server/jaggeryapps/*
@ -167,6 +169,7 @@ then
rm -rf ${DIR}/../repository/deployment/server/synapse-configs/default/api/* rm -rf ${DIR}/../repository/deployment/server/synapse-configs/default/api/*
rm -rf ${DIR}/../repository/deployment/server/synapse-configs/default/sequences/_*.xml rm -rf ${DIR}/../repository/deployment/server/synapse-configs/default/sequences/_*.xml
cp -rf ${DIR}/../repository/resources/profiles/backend/*.sh ${DIR}/../bin/ cp -rf ${DIR}/../repository/resources/profiles/backend/*.sh ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/backend/*.bat ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/backend/carbon.xml ${DIR}/../conf/ cp -rf ${DIR}/../repository/resources/profiles/backend/carbon.xml ${DIR}/../conf/
rm -rf ${DIR}/../repository/deployment/server/webapps/oauth2.war ${DIR}/../repository/deployment/server/webapps/shindig.war ${DIR}/../repository/deployment/server/webapps/api#am#publisher#v0.11.war ${DIR}/../repository/deployment/server/webapps/api#am#store#v0.11.war ${DIR}/../repository/deployment/server/webapps/api#appm#oauth#v1.0.war ${DIR}/../repository/deployment/server/webapps/api#appm#publisher#v1.1.war ${DIR}/../repository/deployment/server/webapps/api#appm#store#v1.1.war rm -rf ${DIR}/../repository/deployment/server/webapps/oauth2.war ${DIR}/../repository/deployment/server/webapps/shindig.war ${DIR}/../repository/deployment/server/webapps/api#am#publisher#v0.11.war ${DIR}/../repository/deployment/server/webapps/api#am#store#v0.11.war ${DIR}/../repository/deployment/server/webapps/api#appm#oauth#v1.0.war ${DIR}/../repository/deployment/server/webapps/api#appm#publisher#v1.1.war ${DIR}/../repository/deployment/server/webapps/api#appm#store#v1.1.war
rm -rf ${DIR}/../repository/deployment/server/webapps/dynamic-client-web.war ${DIR}/../repository/deployment/server/webapps/client-registration#v0.11.war rm -rf ${DIR}/../repository/deployment/server/webapps/dynamic-client-web.war ${DIR}/../repository/deployment/server/webapps/client-registration#v0.11.war
@ -203,6 +206,7 @@ then
rm -rf ${DIR}/profile-creator.sh rm -rf ${DIR}/profile-creator.sh
rm -rf ${DIR}/profile-creator.bat rm -rf ${DIR}/profile-creator.bat
cp -rf ${DIR}/../repository/resources/profiles/manager/*.sh ${DIR}/../bin/ cp -rf ${DIR}/../repository/resources/profiles/manager/*.sh ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/manager/*.bat ${DIR}/../bin/
cp -rf ${DIR}/../repository/resources/profiles/manager/carbon.xml ${DIR}/../conf/ cp -rf ${DIR}/../repository/resources/profiles/manager/carbon.xml ${DIR}/../conf/
mkdir ${DIR}/../repository/deployment/server/tempwebapp mkdir ${DIR}/../repository/deployment/server/tempwebapp
cp ${DIR}/../repository/deployment/server/webapps/api#am#publisher#v0.11.war ${DIR}/../repository/deployment/server/tempwebapp/ cp ${DIR}/../repository/deployment/server/webapps/api#am#publisher#v0.11.war ${DIR}/../repository/deployment/server/tempwebapp/
@ -296,7 +300,7 @@ mkdir -p ${DIR}/../wso2/components/tmp_plugins
for BUNDLE in $DEFAULT_BUNDLES; do for BUNDLE in $DEFAULT_BUNDLES; do
IFS=',' read -a bundleArray <<< "$BUNDLE" IFS=',' read -a bundleArray <<< "$BUNDLE"
JAR=${bundleArray[0]}_${bundleArray[1]}.jar JAR=${bundleArray[0]}_${bundleArray[1]}.jar
cp ${DIR}/../wso2/components/plugins/${JAR} ${DIR}/../wso2/components/tmp_plugins cp ${DIR}/../wso2/components/plugins/${JAR} ${DIR}/../wso2/components/tmp_plugins 2> /dev/null
done done
rm -r ${DIR}/../wso2/components/plugins rm -r ${DIR}/../wso2/components/plugins
@ -304,6 +308,7 @@ mv ${DIR}/../wso2/components/tmp_plugins ${DIR}/../wso2/components/plugins
echo "Preparing a profile distribution archive." echo "Preparing a profile distribution archive."
cd ${DIR}/../../ cd ${DIR}/../../
rm -rf ${DISTRIBUTION}${PROFILE}
mv ${DISTRIBUTION} ${DISTRIBUTION}${PROFILE} mv ${DISTRIBUTION} ${DISTRIBUTION}${PROFILE}
zip -r ${DISTRIBUTION}${PROFILE}.zip ${DISTRIBUTION}${PROFILE}/ zip -r ${DISTRIBUTION}${PROFILE}.zip ${DISTRIBUTION}${PROFILE}/
cd ${BINDIR} cd ${BINDIR}

Loading…
Cancel
Save