#! /bin/sh

#Path=`pwd`;
cd /app/Web/public;
#cd `pwd`/public;

Path=.;

if [ "$1" = "Third_Party_css" ]; then

    #find $Path/Third_Party -name "*.css" | sed 's/\.\//\//g';
    find $Path/Third_Party -name "*.css";
    #find $Path/Third_Party -name "*.css" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';

elif [ "$1" = "Third_Party_js" ]; then

    #find $Path/Third_Party -name "*.js" | grep -v "Login" | sed 's/\.\//\//g';
    find $Path/Third_Party -name "*.js" | grep -v "Login";
    #find $Path/Third_Party -name "*.js" | grep -v "Login" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';

elif [ "$1" = "css" ]; then

    #find $Path/Plugin/Main -name "*.css" | sed 's/\.\//\//g';
    #find $Path/Plugin/Common -name "*.css" | sed 's/\.\//\//g';
    find $Path/Plugin/Main -name "*.css";
    find $Path/Plugin/Common -name "*.css";
    #find $Path/Plugin/Main -name "*.css" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';
    #find $Path/Plugin/Common -name "*.css" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';

elif [ "$1" = "GlobalVariable" ]; then

    find $Path/Plugin -name "GlobalVariable.h.js" | grep -v "Plugin/Main/js/GlobalVariable.h.js";

elif [ "$1" = "head" ]; then

    #find $Path/Plugin -name "*.h.js" | sed 's/\.\//\//g';
    find $Path/Plugin -name "*.h.js" | grep -v "GlobalVariable.h.js" | grep -v "Plugin/Common/js/Common.h.js" | grep -v "Plugin/Main/js/ProgressBar.h.js";
    #find $Path/Plugin -name "*.h.js" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';

elif [ "$1" = "jpp" ]; then

    #find $Path/Plugin -name "*.jpp.js" | sed 's/\.\//\//g';
    find $Path/Plugin -name "*.jpp.js" | grep -v "Plugin/Common/js/Common.jpp.js" | grep -v "Plugin/Main/js/ProgressBar.jpp.js";
    #find $Path/Plugin -name "*.jpp.js" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';

elif [ "$1" = "Main" ]; then

    #find $Path/Plugin -name "Main.*.js" | sed 's/\.\//\//g';
    find $Path/Plugin -name "Main.*.js" | grep -v ".h.js" | grep -v ".jpp.js" | sort;
    #find $Path/Plugin -name "Main.*.js" | sed 's/\.\//\.\.\/\.\.\/\.\.\//g';
fi
