From fd38c61d4cec5c9401d43575ffbce275586516da Mon Sep 17 00:00:00 2001 From: Luca Trubbiani Date: Wed, 10 Jul 2024 12:53:32 +0200 Subject: [PATCH] Replace log with echo in builder-tool.sh --- core-builder-tool/builder-tool.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core-builder-tool/builder-tool.sh b/core-builder-tool/builder-tool.sh index 0afe28b7..66bd617d 100755 --- a/core-builder-tool/builder-tool.sh +++ b/core-builder-tool/builder-tool.sh @@ -97,7 +97,7 @@ handle_error() { # Function to synchronize files based on context-sources-map using rsync -sync_files_with_rsync() { +sync_files() { local map_file="$1" local base64_dir="$2" local destination_dir="$3" @@ -114,7 +114,7 @@ sync_files_with_rsync() { # Check if MAP_FILE exists if [ ! -f "$map_file" ]; then - log "Error: Context-sources-map file '$map_file' does not exist." + echo "Error: Context-sources-map file '$map_file' does not exist." exit 1 fi @@ -130,7 +130,7 @@ sync_files_with_rsync() { # Check if the source file exists if [ ! -f "$source_file" ]; then - log "Error: Source file '$source_file' does not exist." + echo "Error: Source file '$source_file' does not exist." continue fi @@ -142,9 +142,9 @@ sync_files_with_rsync() { # Check rsync exit status if [ $? -eq 0 ]; then - log "Successfully copied '$source_file' to '$destination_path'" + echo "Successfully copied '$source_file' to '$destination_path'" else - log "Error: Failed to rsync '$source_file' to '$destination_path'" + echo "Error: Failed to rsync '$source_file' to '$destination_path'" fi done < "$map_file" } @@ -155,7 +155,7 @@ trap 'handle_error $LINENO "$BASH_COMMAND"' ERR # Process context-sources.txt if [ -f "$source_dir/context-sources-map.txt" ]; then - sync_files_with_rsync "$source_dir/context-sources-map.txt" "$source_dir/" "$destination_dir" + sync_files "$source_dir/context-sources-map.txt" "$source_dir/" "$destination_dir" fi @@ -177,7 +177,6 @@ if [ -f "$source_dir/context-refs.txt" ]; then echo "Downloading $rebuilt_url" echo "to $destination_dir/$destination" - username=$GIT_USERNAME password=$GIT_PASSWORD token=$GIT_TOKEN