aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-08-08 20:57:34 +0800
committermat <mat@FreeBSD.org>2016-08-08 20:57:34 +0800
commit6afc9164c7438adf2a458af80869b067f7c80dbb (patch)
tree02a6e8e1b6535a935e582725fc0f6ad242cd0c23 /Mk
parentb028b2a25492bbfbc4543c1b95b1d80c83ab460c (diff)
downloadfreebsd-ports-gnome-6afc9164c7438adf2a458af80869b067f7c80dbb.tar.gz
freebsd-ports-gnome-6afc9164c7438adf2a458af80869b067f7c80dbb.tar.zst
freebsd-ports-gnome-6afc9164c7438adf2a458af80869b067f7c80dbb.zip
Only try to create DISTDIR if it does not exist already.
It turns out, some people, instead of setting DISTDIR, replace it with a symlink pointing to where DISTDIR should be pointing. And mkdir -p <symlink> fails. PR: 211623 Reported by: Harald Schmalzbauer Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/do-fetch.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/Mk/Scripts/do-fetch.sh b/Mk/Scripts/do-fetch.sh
index 2391b964bd39..879120e5cb07 100644
--- a/Mk/Scripts/do-fetch.sh
+++ b/Mk/Scripts/do-fetch.sh
@@ -17,7 +17,9 @@ validate_env dp_DEVELOPER dp_DISABLE_SIZE dp_DISTDIR dp_DISTINFO_FILE \
set -u
-mkdir -p "${dp_DISTDIR}"
+if [ ! -d "${dp_DISTDIR}" ]; then
+ mkdir -p "${dp_DISTDIR}"
+fi
cd "${dp_DISTDIR}"
for _file in "${@}"; do