awips2/deltaScripts/14.3.1/subsetRelocator.sh
Mike Duff 890faf2d73 Issue #2864 - Change how saved subset files are stored.
Change-Id: I57c68196a633a55a6f9c1548eff7ad449fadb88c

Former-commit-id: 3052e5f92f4150fa82bfd93f512bb1670f926ec1
2014-04-11 08:27:42 -05:00

43 lines
789 B
Bash

#!/bin/bash
# DR 2864 - update the location of saved subset files
echo "Updating saved subset file locations"
startDir=/awips2/edex/data/utility/cave_static/user
cd $startDir
users=$(ls -1)
for i in $users
do
cd $i
if [ -e dataDelivery/subset ]
then
cd dataDelivery/subset
if [ ! -e GRID ]
then
mkdir GRID
fi
if [ ! -e POINT ]
then
mkdir POINT
fi
gridFiles=$(grep providerName *.xml | grep NOMADS | cut -d: -f1)
pointFiles=$(grep providerName *.xml | grep MADIS | cut -d: -f1)
for j in $gridFiles
do
mv $j* GRID
done
for j in $pointFiles
do
mv $j* POINT
done
fi
cd $startDir
done
echo "Update complete"