diff options
-rwxr-xr-x | Tools/scripts/redundant-opt-files.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/scripts/redundant-opt-files.sh b/Tools/scripts/redundant-opt-files.sh index a86efb7e477c..6d028f153e1a 100755 --- a/Tools/scripts/redundant-opt-files.sh +++ b/Tools/scripts/redundant-opt-files.sh @@ -9,6 +9,12 @@ # deleted in order to prevent future configuration check failures. portsdir=${PORTSDIR:-/usr/ports} +if [ ! -d "${portsdir}" ]; then + echo "The ${portsdir} ports directory does not exist" + echo "There is nothing more to do." + exit +fi + db_dir=$(/usr/bin/make -C ${portsdir}/devel/gmake -V PORT_DBDIR 2>/dev/null) if [ ! -d "${db_dir}" ]; then |