Chris@1590: #!/bin/bash Chris@1590: Chris@1590: set -e Chris@1590: Chris@1596: # Copy reposman (repository manager) scripts, including the generated Chris@1596: # scripts with interpolated API key etc, to the directory they will be Chris@1596: # run from. Chris@1596: Chris@1596: # There are two sets of scripts here: Chris@1596: # Chris@1596: # 1. The reposman script that plods through all the projects that have Chris@1596: # repositories defined, creates those repositories on disc, and Chris@1596: # registers their locations with the projects. This happens often, Chris@1596: # currently every minute. Chris@1596: # Chris@1596: # 2. The external repo management script that plods through all the Chris@1596: # projects that have external repositories defined, clones or updates Chris@1596: # those external repos to their local locations, and if necessary Chris@1596: # registers them with the projects. This happens less often, currently Chris@1596: # every hour. Chris@1590: Chris@1590: cd /var/www/code Chris@1590: Chris@1590: mkdir -p reposman Chris@1590: Chris@1590: for file in \ Chris@1590: convert-external-repos.rb \ Chris@1590: reposman-soundsoftware.rb \ Chris@1590: run-hginit.sh \ Chris@1590: update-external-repo.sh ; do Chris@1590: if [ ! -f reposman/"$file" ]; then Chris@1590: cp extra/soundsoftware/"$file" reposman/ Chris@1590: fi Chris@1590: done Chris@1590: Chris@1590: for file in \ Chris@1590: run-external.sh \ Chris@1590: run-reposman.sh ; do Chris@1590: if [ ! -f reposman/"$file" ]; then Chris@1593: cp deploy/config/"$file".gen reposman/"$file" Chris@1590: fi Chris@1590: done Chris@1590: Chris@1590: chown code.www-data reposman/* Chris@1590: chmod +x reposman/*.sh Chris@1590: chmod +x reposman/*.rb Chris@1590: Chris@1590: touch /var/log/reposman.log Chris@1590: touch /var/log/external-repos.log Chris@1590: chown www-data.code /var/log/reposman.log Chris@1590: chown www-data.code /var/log/external-repos.log Chris@1590: