I got a segment fault running an oorexx script. Assuming that I can reproduce it, what diagnostic data do I need to collect before reporting it, and does the bug report go to openSUSE or to SourceForge? I don’t currently have any debug packages installed, but will happily install anything that will help to track this down (I hate people who complain about bugs but can’t be bothered to report them <g>.) Thanks.
#!/usr/bin/rexx.oorexx
/* Copy file from thumb drive and convert CRLF to LF */
trace ?i
call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
call SysLoadFuncs
parse source os cmd script
if os = 'OS/2' then
sbase = 'j:\TSM\openSUSE'
else
sbase = '/run/media/'userid()'/DFSFAT32/TSM/openSUSE'
slen = sbase~length
parse arg selections
if selections~caselesscompare(all) = 0 | selections = '*' then
selections = 'bin etc HOME THE'
do while selections ª= ''
parse var selections selection
select
when selection = 'bin' then
call copytree 'usr/local/bin', '/usr/local/bin', 755
when selection = 'etc' then do
call copytree 'etc', '/etc', 644
trace ?i
if SysFileTree(sbase'/etc/profile.d/*', 'PROFS.', FOS) ª= 0 then do
say 'SysFileTree failed'
exit 4
end
do prof over profs.
'chmod' 755 sbase '/etc/profile.d'prof~delstr(1,plen)
end
end
when selection = HOME then
call copytree 'HOME', '~', 750
when selection = THE then
call copytree 'usr/local/THE', '/usr/local/THE', 644
otherwise do
say 'Directory specification' selection 'not recognized'
exit 2
end
end
end
exit
copytree: procedure expose sbase slen
use strict arg dir, tbase, mode
sdir = sbase'/'dir
len = sdir~length
if SysFileTree(sdir'/*', 'PATHS', FOS) ª= 0 then do
say 'SysFileTree failed'
exit 4
end
do path over paths
tpath = tbase'/'path~delstr(1,len)
'dos2unix --keepdate -c iso -437 -v -n' path tpath
'chmod' mode tpath
end
return