adding bash script to copy configs to bound folders

This commit is contained in:
2026-02-22 20:46:10 +00:00
parent 73d7825fa1
commit af14e825c8

21
scripts/copy.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Set the source and destination directories
source_dir=/app
destination_dir=/config
# Get a list of files in the source directory
files=$(ls "$source_dir")
# Loop through the list of files
for file in $files
do
# Check if the file exists in the destination directory
if [ ! -f "$destination_dir/$file" ]; then
# If the file does not exist, copy it to the destination directory
cp "$source_dir/$file" "$destination_dir/$file"
echo "Copied $file to $destination_dir"
else
echo "$file already exists in $destination_dir"
fi
done