Skip to content

Commit

Permalink
Replace log with echo in builder-tool.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
trubbio83 committed Jul 10, 2024
1 parent 4162a94 commit fd38c61
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core-builder-tool/builder-tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand All @@ -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

Expand All @@ -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"
}
Expand All @@ -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


Expand All @@ -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
Expand Down

0 comments on commit fd38c61

Please sign in to comment.