#!/bin/bash

cd /home/layer1/themes/modules

for dir in `find . -type d -name 'pro-*'`
do
  cd $dir;
  echo -n "Currently updating `pwd` ..."
  tar zxvf pkg.tar.gz
  #tar ztf pkg.tar.gz
  cd cpanel
  tar zxvf /home/layer1/themes/modules/cpanelpro/pkg.tar.gz
  #tar ztf /home/layer1/themes/modules/cpanelpro/pkg.tar.gz
  tar czvf pkg.tar.gz cpanel
  echo
  echo "done"
  cd /home/layer1/themes/modules
done

