This commit is contained in:
yalh76 2022-06-17 13:32:01 +02:00
parent 81984fa0c4
commit d740a9e440
4 changed files with 222 additions and 202 deletions

View file

@ -27,9 +27,11 @@ function debranding() {
find $final_path/$appname -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/<a[^>]*>Powered by <[^>]*>Odoo<\/[^>]*><\/a>//g' {} \; find $final_path/$appname -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/<a[^>]*>Powered by <[^>]*>Odoo<\/[^>]*><\/a>//g' {} \;
find $final_path/$appname -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <[^>]*>Odoo<\/[^>]*>//g' {} \; find $final_path/$appname -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <[^>]*>Odoo<\/[^>]*>//g' {} \;
find $final_path/$appname -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <[^>]*><img[^>]*Odoo[^>]*><\/a>//g' {} \; find $final_path/$appname -type f \( -iname '*.xml' -o -iname '*.po' \) -exec sed -i 's/Powered by <[^>]*><img[^>]*Odoo[^>]*><\/a>//g' {} \;
if test -f "$final_path/$appname/addons/web/static/src/xml/base.xml"; then
sed -i 's/<a[^>]*>My Odoo.com account<\/a>//g' $final_path/$appname/addons/web/static/src/xml/base.xml sed -i 's/<a[^>]*>My Odoo.com account<\/a>//g' $final_path/$appname/addons/web/static/src/xml/base.xml
sed -i 's/<a[^>]*>Documentation<\/a>//g' $final_path/$appname/addons/web/static/src/xml/base.xml sed -i 's/<a[^>]*>Documentation<\/a>//g' $final_path/$appname/addons/web/static/src/xml/base.xml
sed -i 's/<a[^>]*>Support<\/a>//g' $final_path/$appname/addons/web/static/src/xml/base.xml sed -i 's/<a[^>]*>Support<\/a>//g' $final_path/$appname/addons/web/static/src/xml/base.xml
fi
cp ../conf/logo_type.png $python_app/addons/base/static/img/logo_white.png cp ../conf/logo_type.png $python_app/addons/base/static/img/logo_white.png
cp ../conf/favicon.ico $final_path/$appname/addons/web/static/src/img/favicon.ico cp ../conf/favicon.ico $final_path/$appname/addons/web/static/src/img/favicon.ico

View file

@ -164,15 +164,21 @@ if ! wkhtmltopdf --version | grep "wkhtmltopdf 0.12.4 (with patched qt)"; then
fi fi
fi fi
pushd $final_path pushd $final_path
RUSTUP_HOME="$final_path/.rustup" CARGO_HOME="$final_path/.cargo" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal'
PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
if grep "python3" $final_path/$appname/$FORKNAME-bin ; then if grep "python3" $final_path/$appname/$FORKNAME-bin ; then
python3 -m venv venv python3 -m venv venv
venv/bin/pip3 install --upgrade pip
venv/bin/pip3 install wheel venv/bin/pip3 install wheel
venv/bin/pip3 install -r $appname/requirements.txt venv/bin/pip3 install -r $appname/requirements.txt
else else
virtualenv venv virtualenv venv
venv/bin/pip3 install --upgrade pip
venv/bin/pip install wheel venv/bin/pip install wheel
venv/bin/pip install -r $appname/requirements.txt venv/bin/pip install -r $appname/requirements.txt
fi fi
ynh_secure_remove --file="$final_path/.cargo"
ynh_secure_remove --file="$final_path/.rustup"
popd popd
#================================================= #=================================================

View file

@ -123,15 +123,21 @@ if ! wkhtmltopdf --version | grep "wkhtmltopdf 0.12.4 (with patched qt)"; then
fi fi
fi fi
pushd $final_path pushd $final_path
RUSTUP_HOME="$final_path/.rustup" CARGO_HOME="$final_path/.cargo" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal'
PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
if grep "python3" $final_path/$appname/$FORKNAME-bin ; then if grep "python3" $final_path/$appname/$FORKNAME-bin ; then
python3 -m venv venv python3 -m venv venv
venv/bin/pip3 install --upgrade pip
venv/bin/pip3 install wheel venv/bin/pip3 install wheel
venv/bin/pip3 install -r $appname/requirements.txt venv/bin/pip3 install -r $appname/requirements.txt
else else
virtualenv venv virtualenv venv
venv/bin/pip3 install --upgrade pip
venv/bin/pip install wheel venv/bin/pip install wheel
venv/bin/pip install -r $appname/requirements.txt venv/bin/pip install -r $appname/requirements.txt
fi fi
ynh_secure_remove --file="$final_path/.cargo"
ynh_secure_remove --file="$final_path/.rustup"
popd popd
#================================================= #=================================================

View file

@ -138,15 +138,21 @@ if ! wkhtmltopdf --version | grep "wkhtmltopdf 0.12.4 (with patched qt)"; then
fi fi
fi fi
pushd $final_path pushd $final_path
RUSTUP_HOME="$final_path/.rustup" CARGO_HOME="$final_path/.cargo" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable --profile=minimal'
PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
if grep "python3" $final_path/$appname/$FORKNAME-bin ; then if grep "python3" $final_path/$appname/$FORKNAME-bin ; then
python3 -m venv venv python3 -m venv venv
venv/bin/pip3 install --upgrade pip
venv/bin/pip3 install wheel venv/bin/pip3 install wheel
venv/bin/pip3 install -r $appname/requirements.txt venv/bin/pip3 install -r $appname/requirements.txt
else else
virtualenv venv virtualenv venv
venv/bin/pip3 install --upgrade pip
venv/bin/pip install wheel venv/bin/pip install wheel
venv/bin/pip install -r $appname/requirements.txt venv/bin/pip install -r $appname/requirements.txt
fi fi
ynh_secure_remove --file="$final_path/.cargo"
ynh_secure_remove --file="$final_path/.rustup"
popd popd
#================================================= #=================================================