dev-scripts/run.sh

19 lines
405 B
Bash
Raw Normal View History

2020-06-08 20:16:18 +00:00
#!/bin/sh
. ./config-urls
if [ "$1" = 'local' ] ; then
( export local_url="$local_url"; \
export remote_url="$remote_url"; \
cat config "$2" \
) | ssh root@"$local_url" -T /bin/sh
elif [ "$1" = 'remote' ] ; then
( export local_url="$remote_url"; \
export remote_url="$local_url"; \
cat config "$2" \
) | ssh root@"$remote_url" -T /bin/sh
else
echo "error: must specify local or remote"
fi