#!/bin/bash
[% c("var/set_default_env") -%]
[% SET channel = c('var/channel') -%]
rm -Rf [% shell_quote(c("basedir")) %]/tools/update-responses/htdocs/[% channel %]
[% shell_quote(c("basedir")) %]/tools/update-responses/update_responses [% channel %]
mkdir -p [% shell_quote(path(dest_dir)) %]/update-responses
mv [% shell_quote(c("basedir")) %]/tools/update-responses/htdocs/[% channel %] [% channel %]
find [% channel %] -type d -exec chmod 775 {} \;
find [% channel %] -type f -exec chmod 664 {} \;
tar cf [% shell_quote(path(dest_dir)) %]/update-responses/update-responses-[% channel %]-[%  c("version") %].tar [% channel %]
