#!/bin/bash # This file updates the /etc/puppet directory with recent changes to the # /var/git/repositories/puppet repository and changes to other remote # repositories configured as submodules of this puppet installation. This # script it intended to be called from a cron-job. PUPPET_DIR=/etc/puppet ORIGIN_DIR=/var/git/repositories/puppet.git unset GIT_DIR cd ${PUPPET_DIR} git pull ${ORIGIN_DIR} master git checkout -f git submodule update --init git clean -d -f find ${PUPPET_DIR} -type f -exec chmod 640 {} \; find ${PUPPET_DIR} -type d -exec chmod 750 {} \;