Commit f2191a29 authored by Misagh Moayyed's avatar Misagh Moayyed


parent 68a9324f
......@@ -29,6 +29,7 @@ function help() {
echo -e "\tdocker: \tBuild a Docker image based on the current build and configuration"
echo -e "\tgencert: \tCreate keystore with SSL certificate in location where CAS looks by default"
echo -e "\tgetview: \tAsk for a view name to be included in the overlay for customizations"
echo -e "\tgetresource: \tAsk for a resource name (properties/json/etc file) to be included in the overlay for customizations"
echo -e "\tlistviews: \tList all CAS views that ship with the web application and can be customized in the overlay"
echo -e "\tpackage: \tClean and build CAS war"
echo -e "\texplode: \tExplode and unzip and packaged CAS war"
......@@ -102,10 +103,40 @@ function listviews() {
function explodeApp() {
./gradlew clean explodeWar
./gradlew explodeWar
echo "Exploded the CAS web application file at build/cas"
function getresource() {
echo "Searching for resource name $@..."
results=`find $explodedDir -type f -name "*.*" | grep -i "$@"`
count=`wc -w <<< "$results"`
if [ "$count" -eq 0 ];then
echo "No resources could be found matching $@"
exit 1
echo -e "Found resource(s): \n$results"
if [ "$count" -eq 1 ];then
overlayfile=`echo "${results/$fromFile/$toFile}"`
overlaypath=`dirname "${overlayfile}"`
# echo "Overlay file is $overlayfile to be created at $overlaypath"
mkdir -p $overlaypath
cp $results $overlaypath
echo "Created resource at $overlayfile"
ls $overlayfile
echo "More than one resource file is found. Narrow down the search query..."
function getview() {
......@@ -240,6 +271,9 @@ case "$command" in
getview "$@"
getresource "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment