dev-scripts/pull-from.sh

24 lines
463 B
Bash
Raw Normal View History

2020-09-05 11:27:45 +00:00
#!/bin/sh
2020-09-05 13:04:37 +00:00
_target="$1"
2020-09-05 11:27:45 +00:00
2020-09-05 13:04:37 +00:00
if ! [ "$_target" = local ] && ! [ "$_target" = remote ] ; then
echo "Error: must specify 'local' or 'remote' target"
exit 1
fi
echo "Loading $_target configuration"
# source our config files
for _file in ./config/$_target/* ; do
[ -e "$_file" ] || continue
. "$_file"
done
# check we have ssh access
[ -z "$ssh" ] && echo "Error: no ssh configuration specified" && exit 5
if [ -n "$wp_user" ] ; then
. ./scripts/export-wp.sh
fi