Files
Flectra-Odoo-LDAP-Partner-Sync/change_framework.sh
Holger Sielaff 69e2718826 Initial commit
2025-06-26 08:41:56 +02:00

19 lines
512 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -x
from=flectra
to=${1-odoo}
[[ "$to" = "flectra" ]] && from=odoo
[[ ! -d views ]] && echo "No views folder here in $(pwd)" 1>&2 && exit 1
[[ ! "$to" =~ ^odoo|flectra$ ]] && echo "To must be odoo or flectra" 1>&2 && exit 2
for f in views/${from}*.xml; do
tofile=$(echo $f | sed "s/\/$from/\/$to/")
[[ -f "$tofile" ]] && echo "$tofile exists - continue" 1>&2 && continue
sed "s/\(<\/*\)$from>/\1$to>/" $f > $tofile
done
cp ../__manifest__.py.$to ../__manifest__.py