Skip to content
Snippets Groups Projects
Commit b3141017 authored by rds's avatar rds
Browse files

Some directory manipulation to make sure we don't leave files behind...

parent 255991d2
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,10 @@ fi
RELEASE_LOCATION=.
}
zmap_message_out "Easier if we cd to $BASE_DIR"
zmap_cd $BASE_DIR
# If you're in the scripts directory this file is in and would like to
# test this script you'll need to run the following commands.
......@@ -92,8 +96,9 @@ zmap_message_out "got pid of '$X_APP_PID'"
}
# Set the file names
ZMAP_CONFIG_DIR=$BASE_DIR
ZMAP_CONFIG=$ZMAP_CONFIG_DIR/$USER.ZMap
ZMAP_CONFIG=/tmp/$USER.ZMap
COMMAND_FILE=${USER}-xremote_gui.cmd
CONFIG_FILE=${USER}-xremote.ini
......@@ -118,6 +123,7 @@ CONTEXT_FORMAT=context
# N.B. Substitution _will_ occur in this HERE doc.
cat <<EOF > $ZMAP_CONFIG || zmap_message_exit "Failed to write '$ZMAP_CONFIG'"
# Generated by $0
[ZMap]
show_mainwindow=true
[logging]
......@@ -128,9 +134,10 @@ EOF
# N.B. Substitution _will_ occur in this HERE doc.
cat <<EOF > $CONFIG_FILE || zmap_message_exit "Failed to write '$CONFIG_FILE'"
# Generated by $0
[programs]
zmap-exe=$PROGRAM_PATH/zmap
zmap-options=--conf_dir /tmp --conf_file $USER.ZMap
zmap-options=--conf_dir $ZMAP_CONFIG_DIR --conf_file $USER.ZMap
sgifaceserver-exe=$PROGRAM_PATH/sgifaceserver
sgifaceserver-options=-readonly $DATABASE_LOCATION $PORT 0:0
......@@ -174,6 +181,10 @@ $PROGRAM_PATH/xremote_gui \
--config-file $CONFIG_FILE \
--command-file $COMMAND_FILE || zmap_message_exit "Failed runing xremote_gui"
zmap_x11_restore_enviroment
# We've finished with X now.
kill -9 $X_APP_PID
# Now there should be
# a) dumpfiles [$SEQUENCE.gff & $SEQUENCE.context]
......@@ -181,9 +192,17 @@ $PROGRAM_PATH/xremote_gui \
# c) no zmap process
# d) no sgifaceserver process
zmap_x11_restore_enviroment
kill -9 $X_APP_PID
# Now we need to test stuff.
# grep CRITICAL zmap.log
# diff $SEQUENCE.context gold.context
# diff $SEQUENCE.gff gold.gff
zmap_message_out "Reached end of '$SCRIPT_NAME'"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment