23 lines
644 B
Bash
23 lines
644 B
Bash
#!/bin/bash
|
|
# Copies files from template to gpt-researcher directory
|
|
|
|
# Define source and destination directories relative to the script's location
|
|
SOURCE_DIR="./template"
|
|
DEST_DIR="./gpt-researcher"
|
|
|
|
# Check if source directory exists
|
|
if [ ! -d "$SOURCE_DIR" ]; then
|
|
echo "Error: Source directory '$SOURCE_DIR' not found."
|
|
exit 1
|
|
fi
|
|
|
|
# Create destination directory if it doesn't exist
|
|
mkdir -p "$DEST_DIR"
|
|
|
|
# Copy files recursively, overwriting existing files
|
|
# Use /* to copy the contents of the source directory, not the directory itself
|
|
cp -r "$SOURCE_DIR"/* "$DEST_DIR"/
|
|
|
|
echo "Files copied from '$SOURCE_DIR' to '$DEST_DIR'."
|
|
|
|
exit 0 |