mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-14 16:59:52 +00:00
48f7cd7d5d
To be used as the --exec-on-unpack option to rhizome_mirrord Rsyncs all the unpacked zip files to the Serval Maps testing server and fetches the Serval Maps re-scan URL Is invoked with arg1 = path of unpack directory, args2..N = names of newly unpacked directories within arg1 If the RHIZOME_MIRRORD_LOG_STDOUT env var is set, then enables shell execution tracing
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Rhizome Maps push script
|
|
# Copyright (C) 2013 Serval Project Inc.
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
set -e
|
|
|
|
UNPACK_DIR="${1?}"
|
|
shift
|
|
|
|
cd "${TMPDIR:-/tmp}" >/dev/null
|
|
|
|
if [ -n "$RHIZOME_MIRRORD_LOG_STDOUT" ]; then
|
|
set -x
|
|
fi
|
|
|
|
rsync -a \
|
|
"$UNPACK_DIR/" \
|
|
servalp@servalproject.org:/home/servalp/maps.servalproject.org/testing/admin/data/instances/
|
|
|
|
curl -s \
|
|
-o serval_maps_push_result.html \
|
|
-D serval_maps_push_headers.txt \
|
|
http://maps.servalproject.org/testing/admin/cache-update/instances/2798a6651e9caecd3d30fdc5e6a0e0f5
|