31 lines
515 B
Bash
Executable File
31 lines
515 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ -e "setup.py" ]
|
|
then
|
|
ROOT_DIR="$PWD"
|
|
elif [ -e "../setup.py" ]
|
|
then
|
|
ROOT_DIR="$PWD/../"
|
|
else
|
|
echo "Unable to locate 'setup.py' file that should" \
|
|
"exist in the cloud-init root directory."
|
|
exit 1
|
|
fi
|
|
|
|
REQUIRES="$ROOT_DIR/Requires"
|
|
|
|
if [ ! -e "$REQUIRES" ]
|
|
then
|
|
echo "Unable to find 'Requires' file located at $REQUIRES"
|
|
exit 1
|
|
fi
|
|
|
|
# Filter out comments and empty liens
|
|
DEPS=$(cat $REQUIRES | grep -Pv "^\s*#" | grep -Pv '^\s*$')
|
|
echo "$DEPS" | sort -d -f
|
|
|
|
|
|
|