DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦51997d534⟧ TextFile

    Length: 2905 (0xb59)
    Types: TextFile
    Names: »B«

Derivation

└─⟦8ee07855d⟧ Bits:30000545 8mm tape, Rational 1000, DTIA 2_1_6
    └─ ⟦0c25cb74a⟧ »DATA« 
        └─⟦0182c9918⟧ 
            └─⟦this⟧ 
└─⟦d0624311f⟧ Bits:30000529 8mm tape, Rational 1000, DTIA 2_1_7
    └─ ⟦f494b5154⟧ »DATA« 
        └─⟦3ddce7122⟧ 
            └─⟦this⟧ 

TextFile

with Directory_Tools;
with Ftp;
with Ftp_Defs;
with Ftp_Name_Map;
with Log;
with Profile;
with String_Utilities;
procedure Move_Files (To_Platform       : String;
                      Hostname          : String;
                      Username          : String := "root";
                      Password          : String;
                      Install_Directory : String := "/vendor/rational";
                      Response          : String := "<VERBOSE>") is

    package Dtn renames Directory_Tools.Naming;
    package Su  renames String_Utilities;

    Installation_Area : constant String := Dtn.Default_Context;

    Product_Name : constant String :=
       Dtn.Simple_Name (Dtn.Prefix (Installation_Area));

    Archive_File : constant String :=
       Dtn.Full_Name ("!MACHINE.RELEASE.ARCHIVE." & Product_Name & '.' &
                      Dtn.Simple_Name (Installation_Area) & '.' & To_Platform);


    function Build_Release_Name return String is
        The_Release_Name : constant String :=
           Dtn.Simple_Name (Installation_Area);
        End_Index        : Natural         := 0;

    begin
        End_Index := String_Utilities.Reverse_Locate
                        (Fragment => "release", Within => The_Release_Name);

        if End_Index = 0 then
            return The_Release_Name;
        else  
            return "rev" & The_Release_Name
                              (End_Index + 1 .. The_Release_Name'Last);
        end if;
    end Build_Release_Name;


begin
    if Archive_File'Length = 0 then
        Log.Put_Line ("Platform name """ & To_Platform & """ does not exist." &
                      "  Check the spelling of parameter To_Platform",
                      Profile.Error_Msg, Profile.Value (Response));
    else
        declare
            Remote_Release_Name : constant String := Build_Release_Name;

            Workstation_Pathname : constant String :=
               Su.Lower_Case ("archive/" & Product_Name & '/' &
                              Remote_Release_Name & '.' & To_Platform);


        begin
            Ftp.Put (From_Local_File    => Archive_File,
                     To_Remote_File     => Workstation_Pathname,
                     Remote_Machine     => Hostname,
                     Username           => Username,
                     Password           => Password,
                     Account            => "",
                     Remote_Directory   => Install_Directory,
                     Remote_Type        => Ftp_Name_Map.Unix,
                     Append_To_File     => False,
                     Transfer_Type      => Ftp_Defs.Image,
                     Transfer_Mode      => Ftp_Defs.Stream,
                     Transfer_Structure => Ftp_Defs.File,
                     Send_Port          => True,
                     Response           => Profile.Value (Response));
        end;
    end if;
end Move_Files;
pragma Main;