Only copy taginfo-history.db if it exists
[chef.git] / cookbooks / taginfo / templates / default / update-taginfo.erb
1 #!/bin/sh
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 set -e
6
7 ROOT="<%= @directory %>"
8
9 if [ -f "$ROOT/data/taginfo-history.db" ]
10 then
11     cp $ROOT/data/taginfo-history.db $ROOT/sources
12 fi
13
14 $ROOT/taginfo/sources/update_all.sh $ROOT/sources
15
16 mv $ROOT/data/taginfo-* $ROOT/data/old
17 mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
18 mv $ROOT/sources/download/* $ROOT/download
19
20 touch $ROOT/taginfo/web/tmp/restart.txt