rm -rf "<%= @qadatadir %>/old"
if [ -d "<%= @qadatadir %>/current" ]; then
mv "<%= @qadatadir %>/current" "<%= @qadatadir %>/old"
rm -rf "<%= @qadatadir %>/old"
if [ -d "<%= @qadatadir %>/current" ]; then
mv "<%= @qadatadir %>/current" "<%= @qadatadir %>/old"