1
0
Fork 0

Command line interface tweaks.

This commit is contained in:
curt 2000-09-20 21:44:16 +00:00
parent 6282096168
commit 08166715b3
3 changed files with 16 additions and 10 deletions

View file

@ -11,6 +11,6 @@ fgfs_tools_client_SOURCES = client.cxx
fgfs_tools_client_LDADD = -lsgbucket -lsgmisc
INCLUDES += \
-I$(top_builddir)/src \
-I$(top_builddir)/src/Lib \
-I$(top_builddir)/src/Construct
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/Lib \
-I$(top_srcdir)/src/Construct

View file

@ -186,7 +186,7 @@ bool construct_tile( const FGBucket& b, const string& result_file ) {
command = command + " --work-dir=" + work_base;
command = command + " --output-dir=" + output_base;
command = command + " --tile-id=" + b.gen_index_str();
for (int i = 0; i < load_dirs.size(); i++) {
for (int i = 0; i < (int)load_dirs.size(); i++) {
command = command + " " + load_dirs[i];
}
command = command + "> " + result_file + " 2>&1";
@ -237,12 +237,13 @@ usage (const string name)
cout << "[ --output-dir=<directory>" << endl;
cout << " --work-dir=<directory>" << endl;
cout << " --host=<address>" << endl;
cout << " --port=<number> ]" << endl;
cout << " --port=<number>" << endl;
cout << " --rude ]" << endl;
cout << "<load directory...>" << endl;
exit(-1);
}
main(int argc, char *argv[]) {
int main(int argc, char *argv[]) {
long int tile, last_tile;
bool rude = false;
bool result;
@ -283,8 +284,11 @@ main(int argc, char *argv[]) {
else
cout << "Running in polite mode" << endl;
for (int i = arg_pos; i < argc; i++) {
load_dirs.push_back(argv[i]);
cout << "Load directory: " << argv[i] << endl;
string dir;
dir = work_base + "/";
dir += argv[i];
load_dirs.push_back( dir );
cout << "Load directory: " << dir << endl;
}
// get hostname and pid
@ -322,4 +326,6 @@ main(int argc, char *argv[]) {
sleep( BUSY_WAIT_TIME );
}
}
return 0;
}

View file

@ -100,7 +100,7 @@ for i in $CLIENTS_RUDE; do
# KILL_COMMAND="killall $CLIENT"
# ssh -n $i "$KILL_COMMAND"
RMT_COMMAND="source ~/.profile; nice $CLIENT $SERVER_HOST $SERVER_PORT $WORK_BASE $OUTPUT_DIR -r"
RMT_COMMAND="source ~/.profile; nice $CLIENT --host=$SERVER_HOST --port=$SERVER_PORT --work-dir=$WORK_BASE --output-dir=$OUTPUT_DIR --rude AirportArea AirportObj GSHHS-Ponds GSHHS-Islands GSHHS-Lakes GSHHS-LandMass USA-Hydro USA-Urban DEM-3 DEM-30"
echo "client command:"
echo ""
echo "$RMT_COMMAND"