mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2025-03-14 03:48:26 +03:00
make it work with docker
This commit is contained in:
parent
21ffad4495
commit
9b23b36860
2 changed files with 14 additions and 22 deletions
|
@ -1,6 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
set -o pipefail -o errexit
|
||||
|
||||
function replace_embedded_svg_icon() {
|
||||
if [ ! -f $1 ]; then echo "$1 does not exist"; exit -1; fi
|
||||
if [ ! -f $2 ]; then echo "$2 does not exist"; exit -1; fi
|
||||
|
||||
echo "'$1' -> '$2'"
|
||||
|
||||
first='`$'
|
||||
last='^`'
|
||||
sed -i "/$first/,/$last/{ /$first/{p; r $1
|
||||
}; /$last/p; d }" $2
|
||||
}
|
||||
|
||||
# If a patch was not provided, try to choose one
|
||||
if [[ -z ${PATCH_NAME} ]]; then
|
||||
# If a patch with the same name as the ref exists, use it
|
||||
|
@ -30,10 +42,10 @@ echo "Patching images"
|
|||
cp -vfR ../resources/src/* ./apps/web/src/
|
||||
|
||||
echo "Patching logos"
|
||||
../scripts/replace-embedded-svg-icons.sh \
|
||||
replace_embedded_svg_icon \
|
||||
../resources/vaultwarden-admin-console-logo.svg \
|
||||
./apps/web/src/app/admin-console/icons/admin-console-logo.ts
|
||||
../scripts/replace-embedded-svg-icons.sh \
|
||||
replace_embedded_svg_icon \
|
||||
../resources/vaultwarden-password-manager-logo.svg \
|
||||
./apps/web/src/app/layouts/password-manager-logo.ts
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -f $1 ]
|
||||
then
|
||||
echo "$1 does not exist"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -f $2 ]
|
||||
then
|
||||
echo "$2 does not exist"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
echo "'$1' -> '$2'"
|
||||
|
||||
first='`$'
|
||||
last='^`'
|
||||
sed -i "/$first/,/$last/{ /$first/{p; r $1
|
||||
}; /$last/p; d }" $2
|
Loading…
Add table
Reference in a new issue