#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

set -e

ROOT="<%= @directory %>"

if [ -f "$ROOT/data/taginfo-history.db" ]
then
    cp $ROOT/data/taginfo-history.db $ROOT/sources
fi

$ROOT/taginfo/sources/update_all.sh $ROOT/sources

mv $ROOT/data/taginfo-* $ROOT/data/old
mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
mv $ROOT/sources/download/* $ROOT/download

touch $ROOT/taginfo/web/tmp/restart.txt

#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

set -e

ROOT="<%= @directory %>"

cd $ROOT/taginfo/sources

if [ -f "$ROOT/data/taginfo-history.db" ]
then
    cp $ROOT/data/taginfo-history.db $ROOT/sources
fi

$ROOT/taginfo/sources/update_all.sh $ROOT/sources

mv $ROOT/data/taginfo-* $ROOT/data/old
mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
mv $ROOT/sources/download/* $ROOT/download

touch $ROOT/taginfo/web/tmp/restart.txt

Change to the sources directory before running the update
Change to the sources directory before running the update
