blob: e850c47d88a134a6cb828c0caf1f4296b1c1e8d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/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
for module in `git submodule | cut -d" " -f3`; do
cd ${PUPPET_DIR}/${module}
git pull origin master
done
git clean -d -f
|