mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
23 lines
870 B
Bash
23 lines
870 B
Bash
#!/bin/bash
|
|
# This script combines the requirements from base.txt and requirements.txt into serverless_requirements.txt
|
|
|
|
# Navigate to the directory containing this script
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
cd "$DIR"
|
|
|
|
# Concatenate the requirements files with a newline character in between
|
|
cat backend/requirements/base.txt > serverless_requirements.txt
|
|
echo "" >> serverless_requirements.txt
|
|
cat model_data/requirements/requirements.txt >> serverless_requirements.txt
|
|
|
|
# Identify duplicates
|
|
duplicates=$(sort serverless_requirements.txt | uniq -d)
|
|
|
|
if [ -n "$duplicates" ]; then
|
|
echo "Warning: Duplicate entries found:"
|
|
echo "$duplicates"
|
|
echo "Please resolve these conflicts manually in the combined requirements file."
|
|
fi
|
|
|
|
# Print a success message
|
|
echo "Combined requirements files into serverless_requirements.txt"
|