wordpress-dev/load-config.sh

15 lines
244 B
Bash
Raw Normal View History

#!/bin/sh
2020-05-06 15:12:41 +00:00
_file="$(pwd)/$1"
2020-05-06 15:12:41 +00:00
if [ ! -f "$_file" ] ; then
if [ -f "$(pwd)/wp-dev-config" ] ; then
2020-05-06 15:12:41 +00:00
_file="$(pwd)/wp-dev-config"
else
2020-05-06 15:12:41 +00:00
echo "No configuration file supplied and no default ('wp-dev-config') found."
exit 1
fi
fi
2020-05-06 15:12:41 +00:00
. "$_file"