diff --git a/scripts/compile-requirements.sh b/scripts/compile-requirements.sh index a8710c8b44..2af6d8e920 100755 --- a/scripts/compile-requirements.sh +++ b/scripts/compile-requirements.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -#!/bin/bash - # Check if an argument is provided if [ $# -ne 1 ]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi @@ -12,14 +10,12 @@ fi OUT_FILE="$1" # Check if the path is absolute or relative -if [[ "$path" == /* ]]; then +if [[ "$OUT_FILE" == /* ]]; then echo "Absolute path provided: $OUT_FILE" else echo "Relative path provided: $PWD/$OUT_FILE" OUT_FILE="$PWD/$OUT_FILE" fi - -[ -z "$OUT_FILE" ] && echo "Error output file not provided" && exit 1 echo "Writing frozen requirements to: $OUT_FILE" echo "Log python version: $(python --version)" @@ -36,7 +32,6 @@ workon pip-fixed-venv > /dev/null 2>&1 pip3 install pip-tools > /dev/null 2>&1 pip3 install setuptools --upgrade - pip-compile --allow-unsafe --build-isolation --strip-extras \ --output-file $OUT_FILE \ --build-isolation \