#!/bin/sh set -ex branding="$1" server_path="$2" web_path="$2/traccar-web" function rebrand_assets { echo "Rebranding public assets..." if [ -d "${branding}/public" ]; then cp -rf "${branding}/public" "${web_path}" fi } function rebrand_resources { echo "Rebranding app resources..." if [ -d "${branding}/resources" ]; then cp -rf "${branding}/resources" "${web_path}/src" fi } function rebrand_templates { echo "Rebranding app templates..." if [ -d "${branding}/templates" ]; then cp -rf "${branding}/templates" "${server_path}" fi } function main { rebrand_assets rebrand_resources rebrand_templates } main