add pull-from script
This commit is contained in:
parent
4c37540ab5
commit
fad8de9d4e
20
pull-from.sh
20
pull-from.sh
|
@ -1,3 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
_target="$1"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue