You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ivan Beschastnikh edited this page May 27, 2020
·
4 revisions
The following shell script clones the perfume-frontend repository, builds necessary pages, deploys to a specified directory, and removes development files from the deployment.
Shell script contents:
#!/bin/bash# Default deployment location
wwwlocation=/var/www/html/perfume/
# Set deployment if specifiedif [ "$1"!="" ];then
wwwlocation=$1fiecho ===== DEPLOYING PERFUME TO $wwwlocation =====
# Clone perfume frontend repositoryecho ===== CLONING REPOSITORY =====
hg clone https://bitbucket.org/bestchai/perfume-frontend
# Build frontend pagesecho ===== BUILDING FRONTEND PAGES =====
cd perfume-frontend/
python Makefile.py
# Copy all files to actual www directoryecho ===== DEPLOYING =====
cd ..
mkdir -p $wwwlocation
cp -R perfume-frontend/*$wwwlocation# Prune files not needed by a deploymentecho ===== PRUNING DEV FILES FROM DEPLOYMENT =====
cd$wwwlocation
rm -rf Makefile.py README.md deploy_perfume.* template/
Put the above "shell script contents" into a file called deploy_perfume_frontend.sh, then in a terminal, make it executable, and run it: