#!/bin/bash

cd /home/layer1/themes/modules

for dir in `find . -type d -maxdepth 1 -name 'pro-*'`
do
  cd $dir;
  tar zxf pkg.tar.gz
  cp -rf /home/layer1/themes/modules/pro $dir
  tar czf pkg.tar.gz cpanel
  rm -Rf cpanel
  cd /home/layer1/themes/modules
done

