Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Files to actually update the checkout/build system.
  • Loading branch information
Rob Myers committed Nov 6, 2015
1 parent 006097b commit 4560534
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,3 +1,4 @@
cc-wp-theme
python_env/bin
!python_env/bin/ccengine.fcgi.in
python_env/build
Expand All @@ -6,6 +7,7 @@ python_env/lib
python_env/local
python_env/paste_errors.log
python_env/.Python
python_env/src/*
docroot/wp-content/
docroot/wordpress/
#docroot/sitemap.*
Expand Down
5 changes: 2 additions & 3 deletions config/required_packages.txt
Expand Up @@ -11,6 +11,5 @@ php5
php5-mysql
python-librdf
libapache2-mod-fcgid
libapache2-mod-macro
mysql-server
mysql-client
mariadb-server
mariadb-client
45 changes: 34 additions & 11 deletions scripts/bootstrap_checkout.sh
Expand Up @@ -11,11 +11,19 @@ DBPASS=${4:-}
cd ${TOPDIR}

#
# Git submodules
# Theme
#

git submodule init
git submodule update
if [ -d "docroot/wp-content/themes/creativecommons.org" ]
then
pushd "docroot/wp-content/themes/creativecommons.org"
git pull
popd
else
git clone https://github.com/creativecommons/cc-wp-theme.git
ln -s "${TOPDIR}/creativecommons.org" \
"docroot/wp-content/themes/creativecommons.org"
fi

cd python_env

Expand All @@ -26,7 +34,10 @@ cd python_env
virtualenv .
source bin/activate

for i in 'setuptools>=0.7' 'zope.interface>=3.8.0' Paste PasteDeploy PasteScript RDF cssselect transifex-client
# No RDF in pip (it's rdfutils)

for i in 'setuptools>=0.7' 'zope.interface>=3.8.0' Paste PasteDeploy \
PasteScript rdfutils cssselect transifex-client
do
pip install $i
done
Expand All @@ -36,23 +47,35 @@ done

echo "/usr/lib/python2.7/dist-packages/" > lib/python2.7/site-packages/dist-packages.pth


#
# Set up each Python module
# Check out and set up each Python module
#

cd src
pushd src

for i in i18n license.rdf cc.license cc.engine
REPOS=(i18n license.rdf cc.license cc.engine)
for i in "${REPOS[@]}"
do
if [ -d "${i}" ]
then
pushd "${i}"
git pull
popd
else
git clone "https://github.com/creativecommons/${i}.git"
fi
done

for i in "${REPOS[@]}"
do
cd $i
pushd "${i}"
python bootstrap.py -v 2.1.1
bin/buildout
python setup.py develop
cd ..
popd
done

cd .. # python_env
popd # python_env

#
# compile_mo & transstats are needed by cc.engine at runtime, run them now
Expand Down
4 changes: 2 additions & 2 deletions scripts/bootstrap_server_ubuntu.sh
Expand Up @@ -35,15 +35,15 @@ else
echo "Include ${TOPDIR}/config/apache.conf" >> /etc/apache2/httpd.conf
fi

cat <<EOF > /etc/apache2/sites-available/${HOSTNAME}
cat <<EOF > /etc/apache2/sites-available/${HOSTNAME}.conf
<VirtualHost *:80>
Use CCVHost ${HOSTNAME} http ${TOPDIR} /var/log/apache2/${HOSTNAME}
</VirtualHost>
EOF

if [ -f /etc/ssl/private/${HOSTNAME}.key ]
then
cat <<EOF >> /etc/apache2/sites-available/${HOSTNAME}
cat <<EOF >> /etc/apache2/sites-available/${HOSTNAME}.conf
<VirtualHost *:443>
Use CCVHost ${HOSTNAME} https ${TOPDIR} /var/log/apache2/${HOSTNAME}
SSLEngine on
Expand Down

0 comments on commit 4560534

Please sign in to comment.