jld3103
1 year ago
23 changed files with 111 additions and 108 deletions
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 297 B |
Binary file not shown.
@ -0,0 +1,63 @@
|
||||
#!/bin/bash |
||||
set -euxo pipefail |
||||
cd "$(dirname "$0")/.." |
||||
|
||||
color="#f37736" |
||||
|
||||
function precompile_assets() { |
||||
fvm dart run vector_graphics_compiler --input-dir assets/ |
||||
find assets/ -name "*.svg" -exec rm {} \; |
||||
} |
||||
|
||||
function copy_app_svg() { |
||||
id="$1" |
||||
path="$2" |
||||
target="packages/neon/neon_$id/assets/app.svg" |
||||
if [ -f "$path/img/app.svg" ]; then |
||||
cp "$path/img/app.svg" "$target" |
||||
elif [ -f "$path/img/$id.svg" ]; then |
||||
cp "$path/img/$id.svg" "$target" |
||||
else |
||||
echo "Can not find icon for $id in $path" |
||||
exit 1 |
||||
fi |
||||
sed -i "s/fill=\"#[^\"]*\"/fill=\"$color\"/g" "$target" |
||||
( |
||||
cd "packages/neon/neon_$id" |
||||
precompile_assets |
||||
) |
||||
} |
||||
|
||||
rm -rf /tmp/nextcloud-neon |
||||
mkdir -p /tmp/nextcloud-neon |
||||
|
||||
copy_app_svg files external/nextcloud-server/apps/files |
||||
copy_app_svg news external/nextcloud-news |
||||
copy_app_svg notes external/nextcloud-notes |
||||
copy_app_svg notifications external/nextcloud-notifications |
||||
|
||||
icons_dir="packages/neon/neon/assets/icons/server/" |
||||
rm -rf "$icons_dir" |
||||
mkdir -p "$icons_dir" |
||||
|
||||
shopt -s extglob |
||||
for file in external/nextcloud-server/{core/img/*,apps/*/img}/!(app|app-dark).svg; do |
||||
name="$(basename "$file" | sed "s/.svg$//" | sed "s/-dark$//" | sed "s/-white$//").svg" |
||||
if ! grep "<image " "$file"; then |
||||
cp -u "$file" "$icons_dir/$name" |
||||
fi |
||||
done |
||||
|
||||
( |
||||
cd packages/neon/neon |
||||
|
||||
# Nextcloud logo |
||||
wget https://raw.githubusercontent.com/nextcloud/promo/master/nextcloud-logo-inverted.svg -O assets/logo_nextcloud.svg |
||||
|
||||
precompile_assets |
||||
|
||||
melos run generate:neon:build_runner |
||||
melos run generate:neon:l10n |
||||
) |
||||
|
||||
melos run format |
Loading…
Reference in new issue