//
// Written by Curtis Olson, started November 2002.
//
-// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2002 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
//
// 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
#include <simgear/bucket/newbucket.hxx>
SG_USING_STD(string);
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
SG_USING_STD(cout);
SG_USING_STD(endl);
-#endif
-static string server = "baron.flightgear.org";
-static string source_module = "Scenery-0.7.9";
+static string server = "scenery.flightgear.org";
+static string source_module = "Scenery";
static string source_base = server + (string)"::" + source_module;
static string dest_base = "/dest/scenery/dir";
}
char command[512];
-
- // make container directory
char container_dir[512];
- snprintf( container_dir, 512, "%s/%c%03d%c%02d",
+ char dir[512];
+
+ // Sync Terrain
+ snprintf( container_dir, 512, "%s/Terrain/%c%03d%c%02d",
dest_base.c_str(), EW, abs(baselon), NS, abs(baselat) );
snprintf( command, 512, "mkdir -p %s", container_dir );
cout << command << endl;
system( command );
- char dir[512];
- snprintf( dir, 512, "%c%03d%c%02d/%c%03d%c%02d",
+ snprintf( dir, 512, "Terrain/%c%03d%c%02d/%c%03d%c%02d",
+ EW, abs(baselon), NS, abs(baselat),
+ EW, abs(lon), NS, abs(lat) );
+
+ snprintf( command, 512,
+ "rsync --verbose --archive --delete --perms --owner --group %s/%s/ %s/%s",
+ source_base.c_str(), dir, dest_base.c_str(), dir );
+ cout << command << endl;
+ system( command );
+
+ // Sync Objects
+ snprintf( container_dir, 512, "%s/Objects/%c%03d%c%02d",
+ dest_base.c_str(), EW, abs(baselon), NS, abs(baselat) );
+ snprintf( command, 512, "mkdir -p %s", container_dir );
+ cout << command << endl;
+ system( command );
+
+ snprintf( dir, 512, "Objects/%c%03d%c%02d/%c%03d%c%02d",
EW, abs(baselon), NS, abs(baselat),
EW, abs(lon), NS, abs(lat) );