1 $! File: Backup_gnv_curl_src.com
5 $! Procedure to create backup save sets for installing in a PCSI kit.
7 $! To comply with most Open Source licenses, the source used for building
8 $! a kit will be packaged with the distribution kit for the binary.
10 $! Backup save sets are the only storage format that I can expect a
11 $! VMS system to be able to extract ODS-5 filenames and directories.
13 $! The make_pcsi_kit_name.com needs to be run before this procedure to
14 $! properly name the files that will be created.
16 $! This file is created from a template file for the purpose of making it
17 $! easier to port Unix code, particularly open source code to VMS.
18 $! Therefore permission is freely granted for any use.
20 $! Copyright 2009, John Malmberg
22 $! Permission to use, copy, modify, and/or distribute this software for any
23 $! purpose with or without fee is hereby granted, provided that the above
24 $! copyright notice and this permission notice appear in all copies.
26 $! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
27 $! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
28 $! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
29 $! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
30 $! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
31 $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
32 $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 $! 13-Jun-2009 J. Malmberg
36 $!===========================================================================
39 $ default_dir = f$environment("DEFAULT")
41 $ arch_type = f$getsyi("ARCH_NAME")
42 $ arch_code = f$extract(0, 1, arch_type)
44 $ if arch_code .nes. "V"
46 $ set proc/parse=extended
52 $ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
53 $ if kit_name .eqs. ""
55 $ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
58 $ producer = f$trnlnm("GNV_PCSI_PRODUCER")
59 $ if producer .eqs. ""
61 $ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
64 $ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
65 $ if filename_base .eqs. ""
67 $ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
71 $ node_swvers = f$getsyi("NODE_SWVERS")
72 $ node_swvers_type = f$extract(0, 1, node_swvers)
73 $ node_swvers_vers = f$extract(1, f$length(node_swvers), node_swvers)
74 $ swvers_maj = f$element(0, ".", node_swvers_vers)
75 $ node_swvers_min_update = f$element(1, ".", node_swvers_vers)
76 $ swvers_min = f$element(0, "-", node_swvers_min_update)
77 $ swvers_update = f$element(1, "-", node_swvers_min_update)
79 $ if swvers_update .eqs. "-" then swvers_update = ""
81 $ vms_vers = f$fao("!2ZB!2ZB!AS", 'swvers_maj', 'swvers_min', swvers_update)
85 $! If available make an interchange save set
86 $!-------------------------------------------
88 $ if arch_code .eqs. "V"
90 $ interchange = "/interchange"
92 $ if (swvers_maj .ges. "8") .and. (swvers_min .ges. 4)
94 $ interchange = "/interchange/noconvert"
98 $! Move to the base directories
101 $! Put things back on error.
102 $ on warning then goto all_exit
104 $ current_default = f$environment("DEFAULT")
105 $ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
107 $ src_root = "src_root:"
108 $ if f$trnlnm("src_root1") .nes. "" then src_root = "src_root1:"
109 $ backup'interchange' 'src_root'[curl...]*.*;0 -
110 'filename_base'_original_src.bck/sav
113 $! There may be a VMS specific source kit
114 $!-----------------------------------------
115 $ vms_root = "vms_root:"
116 $ if f$trnlnm("vms_root1") .nes. "" then vms_root = "vms_root1:"
118 $ define/user sys$error nl:
119 $ define/user sys$output nl:
120 $ directory 'vms_root'[...]*.*;*/exc=*.dir
121 $ if '$severity' .eq. 1 then files_found = 1
123 $ if files_found .eq. 1
125 $ backup'interchange' 'vms_root'[curl...]*.*;0 -
126 'filename_base'_vms_src.bck/sav
131 $ set def 'default_dir'