Browse Source

definitive fix for netlify ?

pull/10/head
Nicolas Massé 5 years ago
parent
commit
a9b2422dd5
  1. 9
      hugo

9
hugo

@ -8,19 +8,12 @@ function cleanup() {
if [ -n "${NETLIFY_BUILD_BASE:-}" ]; then if [ -n "${NETLIFY_BUILD_BASE:-}" ]; then
# Dirty hack for netlify that don't ship the realpath command # Dirty hack for netlify that don't ship the realpath command
realpath=python ./realpath.py realpath="python ./realpath.py"
fi fi
# On exit, remove any symbolic link in content/french that points # On exit, remove any symbolic link in content/french that points
# to content/english # to content/english
find content/french -type l -print0 | while IFS= read -r -d $'\0' filename; do find content/french -type l -print0 | while IFS= read -r -d $'\0' filename; do
# Temporary hack
echo ">>> " ${realpath:-realpath} "$filename" " <<<"
echo -----
${realpath:-realpath} "$filename"
echo -----
if ${realpath:-realpath} "$filename" | grep -E "^$PWD/" > /dev/null; then if ${realpath:-realpath} "$filename" | grep -E "^$PWD/" > /dev/null; then
rm -f "$filename" rm -f "$filename"
fi fi

Loading…
Cancel
Save