4coder/build_new/helpers/copy-resources.sh

37 lines
1.1 KiB
Bash

#!/bin/bash
copy_resources() {
print_step "Copying resources"
local themes_source="$CODE_DIR/ship_files/themes"
local themes_dest="$BUILD_DIR/themes"
if [[ -d "$themes_source" ]]; then
print_info "Copying themes..."
rm -rf "$themes_dest"
mkdir -p "$themes_dest"
cp -r "$themes_source"/* "$themes_dest/"
print_success "Themes copied"
fi
local fonts_src="$PROJECT_ROOT/non-source/dist_files/fonts"
local fonts_dst="$BUILD_DIR/fonts"
if [[ -d "$fonts_src" ]]; then
print_info "Copying fonts..."
rm -rf "$fonts_dst"
cp -r "$fonts_src" "$fonts_dst"
print_success "Fonts copied"
fi
# Copy config files if they exist
local config_files=("$CODE_DIR/ship_files/config.4coder" "$CODE_DIR/ship_files/bindings.4coder")
for config_file in "${config_files[@]}"; do
if [[ -f "$config_file" ]]; then
local filename=$(basename "$config_file")
cp "$config_file" "$BUILD_DIR/$filename"
print_info "Copied $filename"
fi
done
}