sitemapGeneral.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. Cur_Dir=$(cd `dirname $0`; pwd)
  3. echo "begin xml code"
  4. $Cur_Dir/../../../../yii sitemap/xml/begin
  5. echo "add home url to sitemap xml"
  6. $Cur_Dir/../../../../yii sitemap/xml/home
  7. echo "add category url to sitemap xml"
  8. categoryPageCount=`$Cur_Dir/../../../../yii sitemap/xml/categorypagecount`
  9. echo "There are $categoryPageCount page category to process"
  10. for (( i=1; i<=$categoryPageCount; i++ ))
  11. do
  12. $Cur_Dir/../../../../yii sitemap/xml/category $i
  13. echo "Page $i done"
  14. done
  15. echo "add product url to sitemap xml"
  16. productPageCount=`$Cur_Dir/../../../../yii sitemap/xml/productpagecount`
  17. echo "There are $productPageCount page product to process"
  18. for (( i=1; i<=$productPageCount; i++ ))
  19. do
  20. $Cur_Dir/../../../../yii sitemap/xml/product $i
  21. echo "Page $i done"
  22. done
  23. echo "add cms page url to sitemap xml"
  24. cmsPagePageCount=`$Cur_Dir/../../../../yii sitemap/xml/cmspagepagecount`
  25. echo "There are $cmsPagePageCount page product to process"
  26. for (( i=1; i<=$cmsPagePageCount; i++ ))
  27. do
  28. $Cur_Dir/../../../../yii sitemap/xml/cmspage $i
  29. echo "Page $i done"
  30. done
  31. echo "end xml code"
  32. $Cur_Dir/../../../../yii sitemap/xml/end
  33. echo 'end success'