odoo14-dev-environment/apply_patches.sh

30 lines
906 B
Bash
Executable File

#!/bin/bash
#
# Installs selected content from the downloaded repos into a production folder
#
if [ $UID != 0 ]; then
echo "You need administration privileges to run this script."
exit 1
fi
DESTDIR=/opt/odoo
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Patch OCA modules"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
DEST=$DESTDIR/community/auth_oauth_multi_token/
OPTIONS="--directory=$DEST --strip=1"
patch $OPTIONS < patches/20210420_auth-oauth-multi-token_error-in-login.patch
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo " Patch core Odoo modules"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
DEST=$DESTDIR/core/addons/auth_oauth/
OPTIONS="--directory=$DEST --strip=1"
patch $OPTIONS < patches/20210603_auth-oauth_redirect-to-root.patch