$!-----------------------------------------------------------------'f$verify(0) $! 0BTAIN.COM $! $! And YES, that's A ZERO. Obscurely named procedure which places itself in $! the user's current directory. So named to avoid as much as possible $! clashing with anything currently in the directory. Should delete itself $! away when finished but just in case. Pronounced OB-TAIN. $! $! WASD VMS Web Services, Copyright (C) 1996-2020 Mark G.Daniel. $! This package (all associated programs), comes with ABSOLUTELY NO WARRANTY. $! This is free software, and you are welcome to redistribute it under the $! conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or later version. $! http://www.gnu.org/licenses/gpl.txt $! $! Selectively Install/Update the WASD Web Services Package. $! $! The latest version can be extracted from the target package archive using $! $! $ SET DEFAULT parent_device:[parent_directory] $! $ UNZIP -jq location:archive.ZIP "*/0btain.com" $! $ @[]0BTAIN.COM $! $! ALTERNATIVELY, if the latest package has been extracted to a local location, $! or a previous installation included [INSTALL]0BTAIN.COM, then that version $! can be used to start the whole thing off, extracting the relevant 0BTAIN.COM $! from the specified archive and then executing it. $! $ OBTAIN_VERSION = "v11.5.1" $! $! 17-JUN-2020 MGD initial $!----------------------------------------------------------------------------- $! $ if f$trnlnm("0BTAIN$DBUG") .nes. "" then set verify $ set noon $ say = "write sys$output" $ delete = "delete /noconfirm" $ define /user sys$output nl: $ define /user sys$error nl: $ directory = "directory/noheader/notrailing/date" $ if f$trnlnm("WASD_FILE_DEV") .nes. "" then @WASD_FILE_DEV $ vms_version = f$integer(f$extract(1,1,f$getsyi("version"))) * 10 +- f$integer(f$extract(3,1,f$getsyi("version"))) $ if vms_version .ge. 72 then set process /parse=traditional $ archName = f$edit(f$getsyi("ARCH_NAME"),"UPCASE") $ if archName .eqs. "ALPHA" then archName = "AXP" $ set control=Y $ on controly then goto 0btain_abort $ p1 = f$edit(p1,"UPCASE") $! $ if .not. f$privilege("SYSPRV") $ then $ type sys$input ***************************** * requires SYSPRV enabled * ***************************** $ goto 0btain_abort $ endif $! $!(check whether UNZIP is available) $ define /user sys$output nl: $ define /user sys$error nl: $ unzip -h $ if $severity .nes. "1" $ then $ type nl: $ type sys$input ************ * UNZIP? * ************ There appears to be a problem with the UNZIP verb. Here's UNZIP -h ... $ unzip -h $ say "" $ goto 0btain_abort $ endif $! $ p1 = f$search(p1) $ if f$parse(p1,,,"directory") .eqs. "" .or. - f$parse(p1,,,"name") .eqs. "" .or. - f$parse(p1,,,"type") .eqs. "" $ then $ type sys$input *************************************************** * P1 NEEDS TO BE THE ARCHIVE FILE SPECIFICATION * *************************************************** $ goto 0btain_abort $ endif $! $ archive = p1 $! $ if f$search(archive) .eqs. "" $ then $ type sys$input **************************************** * COULD NOT LOCATE SPECIFIED ARCHIVE * **************************************** $ goto 0btain_abort $ endif $! $ archiveObj = p1 - ".ZIP" + "-" + archName + ".ZIP" $ if f$search(archiveObj) .eqs. "" then archiveObj = "" $! $ set noon $ if f$environment("depth") .eq. 1 $ then $ gosub 0btain_0btain_com $! (now execute that latest version) $ @[]0btain.com 'p1' $ goto 0btain_exit $ endif $! $ type sys$input WASD VMS Web Services, Copyright (C) 1996-2020 Mark G.Daniel. This package (all associated programs), comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or any later version. http://www.gnu.org/licenses/gpl.txt *********************************** $ say " * WASD VMS Web Services ''OBTAIN_VERSION' *" $ type sys$input *********************************** $! $ type sys$input This DCL procedure allows elements of the above version of the WASD package to be extracted and installed/updated in a selective manner. It does require some knowledge of the WASD package and sometimes significant manual intervention. It is intended to allow a site to tailor the WASD content of the installation. $ read sys$command response /prompt="Press RETURN to continue: " $ type sys$input The WASD_ROOT directory is always assumed to be a subdirectory of the current directory and is always created if not already existing. Always perform @0BTAIN from the parent of the (desired) [.WASD_ROOT] even when updating. $ if f$search("[]WASD_ROOT.DIR") .nes. "" $ then $ anupdate = 1 $ type sys$input NOTE: There is already a [.WASD_ROOT] in the current directory. $ directory/date []WASD_ROOT.DIR $ type sys$input This will effectively update it. $ else $ anupdate = 0 $ type sys$input NOTE: There is currently no [.WASD_ROOT] in the current directory. Any further action will result in the creation of one. $ endif $! $ response = "" $ read sys$command response /prompt="Continue? [NO]: " $ say "" $ if .not. response then goto 0btain_exit $! $ type sys$input The selection can be made by specifying one of the listed elements, or by archive path. An overview will be presented and continuing with the option can be declined before continuing. If declined an option to display what would have been extracted is available. If an object module archive is present along with the primary archive the relevant modules are also extracted. 1. CORE extracts build, server, monitor, documentation 2. INSTALL extracts install environment 3. SERVER extracts server code 4. WASDOC extracts documentation and wasDOC code 5. SCRIPTS extracts essential scripts 6. path archive path (e.g. "wasd_root/src/httpd/*") 0. exit $ response = "" $ read sys$command response /prompt="Number or string? [0]: " $ say "" $ if response .eqs. "" then goto 0btain_exit $ if response .eqs. "0" then goto 0btain_exit $ if f$edit(response,"upcase") .eqs. "EXIT" then goto 0btain_exit $ if response .eqs. "1" then gosub 0btain_core $ if f$edit(response,"upcase") .eqs. "CORE" then gosub 0btain_core $ if response .eqs. "2" then gosub 0btain_install $ if f$edit(response,"upcase") .eqs. "INSTALL" then gosub 0btain_server $ if response .eqs. "3" then gosub 0btain_server $ if f$edit(response,"upcase") .eqs. "SERVER" then gosub 0btain_server $ if response .eqs. "4" then gosub 0btain_wasdoc $ if f$edit(response,"upcase") .eqs. "WASDOC" then gosub 0btain_wasdoc $ if response .eqs. "5" then gosub 0btain_scripts $ if f$edit(response,"upcase") .eqs. "SCRIPTS" then gosub 0btain_scripts $ if f$locate("/",response) .lt. f$length(response) $ then $ response_path = response $ gosub 0btain_path $ endif $! $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_core: $ type sys$input ********** * CORE * ********** This option creates/updates essential directories including the [.INSTALL] directory contents, example configuration and startup files from [.EXAMPLE], the server code from [.SRC.HTTPD], the server monitor utility from [.SRC.UTILS], the wasDOC application from [.SRC.WASDOC] and finally the full documentation from [.WASDOC]. The wasDOC utility needs to copied to the CGI_EXE: directory. The [.INSTALL]BUILD.COM or UPDATE.COM (as appropriate) may be used to build this partial installation. The WASD OpenSSL package should be added before build. The wasDOC utility then needs to be copied to the CGI_EXE: directory. $ gosub 0btain_continue $! $ dezip wasd_root/install/* - wasd_root/install.com - wasd_root/update.com - wasd_root/local/* - wasd_root/log/* - wasd_root/log_server/* - wasd_root/http$nobody/* - wasd_root/http$server/* - wasd_root/startup/* - wasd_root/cgi-bin/* - wasd_root/'archName'/* - wasd_root/'archName'-bin/* - wasd_root/example/wasd_config_auth.conf - wasd_root/example/wasd_config_global.conf - wasd_root/example/wasd_config_map.conf - wasd_root/example/wasd_config_msg.conf - wasd_root/example/wasd_config_service.conf - wasd_root/example/wasd_file_dev.com - wasd_root/example/startup*.com -x *v9.com - wasd_root/example/shutdown.com - wasd_root/example/wasd_file_dev.com - wasd_root/runtime/httpd/* - wasd_root/wasdoc/* $ dezip wasd_root/src/build_all.com - wasd_root/src/link_all.com - wasd_root/src/expat/* - wasd_root/src/httpd/* - wasd_root/src/utils/enamel.h - wasd_root/src/utils/*httpdmon* - wasd_root/src/utils/*sechan* - wasd_root/src/wasdoc/* $ if dezipo .nes. "" then - dezipo wasd_root/src/expat/*.obj - wasd_root/src/httpd/*.obj - wasd_root/src/utils/httpdmon.obj - wasd_root/src/utils/sechan.obj - wasd_root/src/wasdoc/*.obj $ gosub 0btain_readme $ say "" $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_install: $ type sys$input ************* * INSTALL * ************* This option creates/updates essential directories including the [.INSTALL] directory contents and [EXAMPLE] startup and shutdown procedures. The SECHAN utility needs to be built. $ gosub 0btain_continue $! $ dezip wasd_root/install/* - wasd_root/local/* - wasd_root/log/* - wasd_root/log_server/* - wasd_root/startup/* - wasd_root/example/startup*.com -x *v9.com - wasd_root/example/shutdown.com - wasd_root/example/wasd_file_dev.com - wasd_root/cgi-bin/* - wasd_root/'archName'/* - wasd_root/'archName'-bin/* - wasd_root/src/utils/enamel.h - wasd_root/src/utils/*sechan* $ if dezipo .nes. "" then dezipo wasd_root/src/utils/sechan.obj $ gosub 0btain_readme $ say "" $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_server: $ type sys$input ************ * SERVER * ************ This option creates/updates the [.SRC.HTTPD] server code and [.SRC.UTILS] server monitor code. The server and the HTTPDmon utility need to be built. $ gosub 0btain_continue $! $ dezip wasd_root/'archName'/* - wasd_root/src/expat/* - wasd_root/src/httpd/* - wasd_root/src/utils/*httpdmon* $ if dezipo .nes. "" then - wasd_root/src/expat/*.obj - wasd_root/src/httpd/*.obj - wasd_root/src/utils/*httpdmon*.obj $ gosub 0btain_readme $ say "" $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_wasdoc: $ type sys$input ************ * WASDOC * ************ This option installs/updates the [.WASDOC] documentation and [.SRC.WASDOC] code. The wasDOC utility then needs to be built and copied to the CGI_EXE: directory. $ gosub 0btain_continue $! $ dezip wasd_root/wasdoc/* - wasd_root/src/wasdoc/* $ if dezipo .nes. "" then dezipo wasd_root/src/wasdoc/*.obj $ gosub 0btain_readme $ say "" $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_scripts: $ type sys$input ************* * SCRIPTS * ************* This option installs/updates some useful scripts (but not all scripts). These then need to be built individuall and copied to the CGI_EXE: directory. $ gosub 0btain_continue $! $ dezip wasd_root/src/other/readme.html - wasd_root/src/other/cgi_symbols.com - wasd_root/src/other/show.com - wasd_root/src/query/* - wasd_root/runtime/query/* - wasd_root/src/conan/* - wasd_root/runtime/conan/* - wasd_root/src/misc/cgilib.* - wasd_root/src/misc/build_cgilib.com - wasd_root/src/misc/cgilibshr.opt $ if dezipo .nes. "" then - wasd_root/src/query/*.obj - wasd_root/src/conan/*.obj - wasd_root/src/misc/cgilib.* $ gosub 0btain_readme $ say "" $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_path: $ type sys$input ********** * PATH * ********** This option will restore the following files... $ unzip -l "''archive'" "''response_path'" $ say "" $ gosub 0btain_continue $ dezip "''response_path'" $ if dezipo .nes. "" then dezipo "''response_path'" $ gosub 0btain_readme $ say "" $ goto 0btain_exit $!----------------------------------------------------------------------------- $ 0btain_0btain_com: $!(extract latest 0BTAIN.COM into the current directory) $ procedure = f$edit(f$environment("procedure"),"upcase") $ if (f$locate("WASD_ROOT:[INSTALL]",procedure) .lt. f$length(procedure) .or. - f$locate("WASD_ROOT.INSTALL]",procedure) .lt. f$length(procedure)) - then procedure = "" $ unzip "-jqoC" 'p1' wasd_root/install/0btain.com $ zstatus = $status $ set on $ if zstatus $ then $! (successfully extracted) $ location = f$parse(p1,,,"device") + f$parse(p1,,,"directory") $ return $ else $ type sys$input ******************************************* * COULD NOT EXTRACT THE LATEST 0BTAIN.COM * ******************************************* $ set noon $ set verify $ unzip -q 'p1' wasd_root/install/0btain.com $! 'f$verify(0) $ set on $ say "" $ goto 0btain_abort $ endif $ return $!----------------------------------------------------------------------------- $ 0btain_continue: $ response = "" $ read sys$command response /prompt="Continue with this? [NO]: " $ if .not. response $ then $ dezip = "unzip -lq " + archive $ dezipo = "" $ readme = 0 $ read sys$command response /prompt="Show what would have been created? [YES]: " $ if response .eqs. "" then response = "YES" $ else $ dezip = "unzip -o " + archive $ dezipo = "" $ if archiveObj then dezipo = "unzip -oqC " + archiveObj $ readme = 1 $ endif $ say "" $ if .not. response then goto 0btain_exit $ return $!----------------------------------------------------------------------------- $ 0btain_readme: $ if .not. readme then return $ copy sys$input: [.wasd_root]readme.html
WASD - for a quarter century and more - the only Web environment implemented expressly for VMS
All of the content in this directory tree is Copyright © 1996-2020 Mark G. Daniel, licenced under the terms of the GNU General Public Licence as published by the Free Software Foundation; version 3 of the License, or any later version.
This WASD installation has been tailored using [INSTALL]0BTAIN.COM.
It therefore may contain only a subset of a full WASD installation!
For further information see https://wasd.vsm.com.au/ and download page at https://wasd.vsm.com.au/wasd/.