Adobe-Marketing-Cloud-Apps / aem-phonegap-starter-kit

⛔️DEPRECATED: Bootstrap your AEM Apps project
MIT License
34 stars 27 forks source link

Script customize-app not available for Windows #3

Open schumacher-cgn opened 9 years ago

schumacher-cgn commented 9 years ago

The script "customize-app" is a .sh Script, that does not run on Windows. Could you provide a Windows Script as well?

Thanks Maik

twbocklertorch commented 7 years ago

This worked for me using Git Bash on Windows:

!/bin/bash

if [ $# -ne 2 ] then echo "This script requires exactly 2 arguments: brand_name followed by app_name" echo "For example: ./customize-app.sh Geometrixx ShapesCon" exit 1 fi

find . -depth -type d -name brand_name_placeholder -execdir mv {} $1 \; find . -depth -type d -name app_name_placeholder -execdir mv {} $2 \; find . -depth -type d -name app_name_placeholder-dev -execdir mv {} $2-dev \;

find . -depth -type f ( -name '.xml' -o -name '.jsp' -o -name index.html -o -name config.json ) -exec sed -i s/brand_name_placeholder/$1/g {} \; find . -depth -type f ( -name '.xml' -o -name '.jsp' -o -name index.html -o -name config.json ) -exec sed -i s/app_name_placeholder/$2/g {} \;

echo "Finished customizing app with $1 brand name and $2 app name."