1$! File: stage_curl_install.com 2$! 3$! This updates or removes the GNV$CURL.EXE and related files for the 4$! new_gnu:[*...] directory tree for running the self tests. 5$! 6$! The files installed/removed are: 7$! [usr.bin]gnv$curl.exe 8$! [usr.bin]curl-config. 9$! [usr.lib]gnv$libcurl.exe 10$! [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe 11$! [usr.include.curl]curl.h 12$! [usr.include.curl]curlver.h 13$! [usr.include.curl]easy.h 14$! [usr.include.curl]mprintf.h 15$! [usr.include.curl]multi.h 16$! [usr.include.curl]stdcheaders.h 17$! [usr.include.curl]typecheck-gcc.h 18$! [usr.lib.pkgconfig]libcurl.pc 19$! [usr.share.man.man1]curl-config.1 20$! [usr.share.man.man1]curl.1 21$! [usr.share.man.man3]curl*.3 22$! [usr.share.man.man3]libcurl*.3 23$! Future: A symbolic link to the release notes? 24$! 25$! Copyright (C) John Malmberg 26$! 27$! Permission to use, copy, modify, and/or distribute this software for any 28$! purpose with or without fee is hereby granted, provided that the above 29$! copyright notice and this permission notice appear in all copies. 30$! 31$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 32$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 33$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 34$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 35$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 36$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 37$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 38$! 39$! SPDX-License-Identifier: ISC 40$! 41$!=========================================================================== 42$! 43$ arch_type = f$getsyi("ARCH_NAME") 44$ arch_code = f$extract(0, 1, arch_type) 45$! 46$ if arch_code .nes. "V" 47$ then 48$ set proc/parse=extended 49$ endif 50$! 51$! 52$! If the first parameter begins with "r" or "R" then this is to 53$! remove the files instead of installing them. 54$ remove_filesq = f$edit(p1, "upcase,trim") 55$ remove_filesq = f$extract(0, 1, remove_filesq) 56$ remove_files = 0 57$ if remove_filesq .eqs. "R" then remove_files = 1 58$! 59$! 60$! If we are staging files, make sure that the libcurl.pc and curl-config 61$! files are present. 62$ if remove_files .eq. 0 63$ then 64$ if f$search("[--]libcurl.pc") .eqs. "" 65$ then 66$ @build_libcurl_pc.com 67$ endif 68$ if f$search("[--]curl-config") .eqs. "" 69$ then 70$ @build_curl-config_script.com 71$ endif 72$ endif 73$! 74$! 75$! Dest dirs 76$!------------------ 77$ dest_dirs1 = "[usr],[usr.bin],[usr.include],[usr.include.curl]" 78$ dest_dirs2 = ",[usr.bin],[usr.lib.pkgconfig],[usr.share]" 79$ dest_dirs3 = ",[usr.share.man],[usr.share.man.man1],[usr.share.man.man3]" 80$ dest_dirs = dest_dirs1 + dest_dirs2 + dest_dirs3 81$! 82$! 83$! Alias links needed. 84$!------------------------- 85$ source_curl = "gnv$curl.exe" 86$ dest_curl = "[bin]gnv$curl.exe" 87$ curl_links = "[bin]curl." 88$ new_gnu = "new_gnu:" 89$! 90$! 91$! Create the directories if they do not exist 92$!--------------------------------------------- 93$ i = 0 94$curl_dir_loop: 95$ this_dir = f$element(i, ",", dest_dirs) 96$ i = i + 1 97$ if this_dir .eqs. "" then goto curl_dir_loop 98$ if this_dir .eqs. "," then goto curl_dir_loop_end 99$! Just create the directories, do not delete them. 100$! -------------------------------------------------- 101$ if remove_files .eq. 0 102$ then 103$ create/dir 'new_gnu''this_dir'/prot=(o:rwed) 104$ endif 105$ goto curl_dir_loop 106$curl_dir_loop_end: 107$! 108$! 109$! Need to add in the executable file 110$!----------------------------------- 111$ if remove_files .eq. 0 112$ then 113$ copy [--.src]curl.exe 'new_gnu'[usr.bin]gnv$curl.exe/prot=w:re 114$ copy [--]curl-config. 'new_gnu'[usr.bin]curl-config./prot=w:re 115$ copy sys$disk:[]gnv$libcurl.exe 'new_gnu'[usr.lib]gnv$libcurl.exe/prot=w:re 116$ endif 117$! 118$ if remove_files .eq. 0 119$ then 120$ set file/enter='new_gnu'[bin]curl. 'new_gnu'[usr.bin]gnv$curl.exe 121$ else 122$ file = "''new_gnu'[bin]curl." 123$ if f$search(file) .nes. "" then set file/remove 'file';* 124$ endif 125$! 126$! 127$ if remove_files .eq. 0 128$ then 129$ copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h 130$ copy [--.include.curl]system.h - 131 'new_gnu'[usr.include.curl]system.h 132$ copy [--.include.curl]curlver.h - 133 'new_gnu'[usr.include.curl]curlver.h 134$ copy [--.include.curl]easy.h - 135 'new_gnu'[usr.include.curl]easy.h 136$ copy [--.include.curl]mprintf.h - 137 'new_gnu'[usr.include.curl]mprintf.h 138$ copy [--.include.curl]multi.h - 139 'new_gnu'[usr.include.curl]multi.h 140$ copy [--.include.curl]stdcheaders.h - 141 'new_gnu'[usr.include.curl]stdcheaders.h 142$ copy [--.include.curl]typecheck-gcc.h - 143 'new_gnu'[usr.include.curl]typecheck-gcc.h 144$ copy [--]libcurl.pc 'new_gnu'[usr.lib.pkgconfig]libcurl.pc 145$! 146$ copy [--.docs]curl-config.1 'new_gnu'[usr.share.man.man1]curl-config.1 147$ copy [--.docs]curl.1 'new_gnu'[usr.share.man.man1]curl.1 148$! 149$ copy [--.docs.libcurl]*.3 - 150 'new_gnu'[usr.share.man.man3]*.3 151$! 152$ else 153$ file = "''new_gnu'[usr.bin]curl-config." 154$ if f$search(file) .nes. "" then delete 'file';* 155$ file = "''new_gnu'[usr.bin]gnv$curl.exe" 156$ if f$search(file) .nes. "" then delete 'file';* 157$ file = "''new_gnu'[usr.lib]gnv$libcurl.exe" 158$ if f$search(file) .nes. "" then delete 'file';* 159$ file = "''new_gnu'[usr.include.curl]*.h" 160$ if f$search(file) .nes. "" then delete 'file';* 161$ file = "''new_gnu'[usr.share.man.man1]curl-config.1" 162$ if f$search(file) .nes. "" then delete 'file';* 163$ file = "''new_gnu'[usr.share.man.man1]curl.1" 164$ if f$search(file) .nes. "" then delete 'file';* 165$ file = "''new_gnu'[usr.share.man.man3]curl*.3" 166$ if f$search(file) .nes. "" then delete 'file';* 167$ file = "''new_gnu'[usr.share.man.man3]libcurl*.3" 168$ if f$search(file) .nes. "" then delete 'file';* 169$ endif 170$! 171