Skip to content

Commit

Permalink
Revert uv changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Sep 30, 2024
1 parent 680799b commit dbaea5a
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions requirements/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,18 @@
# Exit immediately if a command exits with a non-zero status
set -e

# Check if uv is installed
if command -v uv &> /dev/null; then
compile_command="uv pip compile"
else
compile_command="pip-compile"
fi

# Flag to check if any .in files exist
found_files=false

# Loop through all .in files in the current directory
for file in *.in; do
for file in *.in
do
# Check if the file exists to avoid errors if there are no .in files
if [[ -f "$file" ]]; then
found_files=true
output_file="${file%.in}.txt"
echo "Compiling $file to $output_file..."
echo "Running command: $compile_command $file -o $output_file"
# Call the compile command for each .in file, outputting to the corresponding .txt file
$compile_command "$file" -o "$output_file"
echo "Compiling $file..."
# Call pip-compile for each .in file
pip-compile -U "$file"
else
echo "No .in files found in the directory."
break
fi
done

# If no .in files were found, notify the user
if [[ $found_files == false ]]; then
echo "No .in files found in the directory."
fi

echo "All .in files have been processed."

0 comments on commit dbaea5a

Please sign in to comment.