#!/bin/sh RESELLERS="esns pitapit-ottawa" for reseller in $RESELLERS do if [ "$reseller" = "esns" ] then subpath="esns" fi if [ "$reseller" = "pitapit-ottawa" ] then subpath="00000410" fi if [ "$subpath" = "" ] then echo "ERROR: $reseller subpath" exit fi for code in `php files/getcodes.php $reseller` do if [ "$code" != "$subpath" ] then echo $code cp files/$code/product_images/* files/$subpath/product_images fi done subpath="" echo "" done