| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #! /bin/bash
- curDir=`pwd`
- # Ask for the domain name to use
- echo -e "\033[92m*** Web site domain name ***\033[0m"
- currentDomain=`grep "hostname=='" ${curDir}/admin.ipsocloud.com/webapp_webpack/src/app.js |awk -F"'" '{ print $2 }' |sed 's/www.//'`
- echo "The current domain name is : ${currentDomain}"
- read -p "New domain name [${currentDomain}] : " domainName
- domainName=${domainName:-${currentDomain}}
- # Change the domain name if needed
- if [ ${domainName} != ${currentDomain} ];
- then
- echo "The domain name will be set to : ${domainName}"
- sed -i "s/$currentDomain/$domainName/g" ${curDir}/admin.ipsocloud.com/webapp_webpack/src/pages/customer.f7.html
- for i in admin cro www;
- do
- sed -i "s/$currentDomain/$domainName/g" ${curDir}/${i}.ipsocloud.com/webapp_webpack/src/app.js
- done
- for i in api cro www;
- do
- sed -i "s/$currentDomain/$domainName/g" ${curDir}/debian/Math-Cloud-server/etc/apache2/sites-available/${i}.conf
- done
- fi
- # Build MAth DLLs
- for i in math-imt math-plaque;
- do
- echo -e "\033[92m*** Build ${i} DLL ***\033[0m"
- cd ${curDir}/api.ipsocloud.com/${i}
- qmake
- make -j$(nproc --all) && cp ${i} ../bin/
- make clean
- done
- # Build ipsocloud web sites
- for i in admin cro www;
- do
- echo -e "\033[92m*** Build ${i}.ipsocloud.com web site***\033[0m"
- cd ${curDir}/${i}.ipsocloud.com/webapp_webpack/
- npm install
- npm run build-dev
- done
- # Create debian packages
- [ -x ${curDir}/debian/buildDeb.sh ] && cd ${curDir}/debian/ && ${curDir}/debian/buildDeb.sh
- cd ${curDir}
|