DOCUMENTATION
SYNOPSIS
PROGRAM NAME: RestoreProject
AUTHOR: Juan Lorenzo
CHANGES and their DATES
DATE: July 2024
Version 1.0
DESCRIPTION
Restore (tar -xzvf) a Project plus
its Project.config file
and restore the Project configuration
file and its associated directory
into the .L_SU foldder
USE
perl RestoreProject.pl
Steps
Tutorial Project
1. Apply tar -xzvf to the compressed and tarred Project file in the user's directory.
2. Replace original user name (e.g., "gllore") with the current user name in Project_config
3. Update Project.config files in .L_SU/configuration/Servilleta and .L_SU/configuration/active
4. Replace folder names of original user name (e.g., "gllore") with the current user's login name
Another named Project
1. Apply tar -xzvf to the compressed and tarred Project file in the user's directory.
2. Confirm that the Project.config directory is present. Otherwise output a warning.
3. Replace original user name (e.g., "gllore") with the current user name in Project_config
4. Replace folder names of original user name (e.g., "gllore") with the current user's login name
5. Message that process is complete
NOTES
We are using Moose.
Moose already declares that you need debuggers turned on
so you don't need a line like the following:
use warnings;
5. replace original user name (e.g., "gllore") with the current user name.
Instantiate classes:
Create a new versions of the packages
Internal definitions
Restoration of Servilleta Tutorial file
stdin is empty
STEP 1.
Does configuration information exist?
TODO: get_PROJECT_exists seems always=false ??
Create an ACTIVE_PROJECT
This is the first time user runs SUG and no .LSU directory exists
Untar a project
Replace old username from backed-up Project.config file,
(new_project_config_file)
with the current user's name
config_superflows has a special configuration file
for program with a name=Project
Updates new Project_config file
in ACTIVE_PROJECT (no ticks)
AND in the Servilleta
subdirectory (with ticks)
Replace the Project_config file within the ACTIVE_PROJECT, because all its parameters have ticks
To do this, copy newly created Project.config, created above by config_superflows_>save, in Servilleta subdirectory to .LSU/configuration/active/Project.config
Change folder names to the new user's
STEP 2
Running Seismic Unix Gui's RestoreProject Tool option Pre-existing project contains RestoreProject.config file in ~pl/username directory
Untar a project
Verify project is a true SUG project
1. Collect existant project names
2. Confirm that SUG configuration system exists
But, if SUG configuration folders do not exist then
this the first time that the user is running
SeismicUnixGui,and folders need to be generated.
check to see that an old project directory does not exist
to prevent overwriting an older project.
prepare useful instructions
CASE 1: First time that any Project is built for this user
in their Home directory
If there are no prior SeismicUnixGui configurations, then create
the directories
CASE 2
N.B. At least one previous project directory
(just created or not) must exist
A Project.config file does not exist
For all newly restored folders, replace folder names = username with the current username
STEPS 1. Find old user name, in backed-up Project.config file 2. Find the current user's name ( see start of this module) 3. Replace the old with current user's name in the Project.config file 4. Replace any restored folder names to the current user's name 5. Create folder in the configuration directory 6. Copy new Project.config file to the configuration directory
Replace old username from backup-up Project.config file
with the name of the current username
config_superflows has a special configuration file
for program with a name=Project
Replace the Project_config file within the ACTIVE_PROJECT, because all its parameters have ticks
To do this, copy newly created Project.config, created above by config_superflows_>save, in Servilleta subdirectory to .LSU/configuration/active/Project.config
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 436:
=pod directives shouldn't be over one line long! Ignoring all 5 lines of content