tutorial/ 040755 003305 000017 00000000000 06521266425 010673 5 0 mwm users 1 0 tutorial/src/ 040755 003305 000017 00000000000 06521266336 007660 5 0 1 0 tutorial/src/addnext 100755 003305 000017 00000006425 06521266335 012023 0 37777753401 1 0 #!/bin/csh -f # # addnext -- given an ordered list of filenames on the command line, # e.g., from to_get_all_slides, add "next" and "Prev" pointers to them set bn = `basename $0` ###################################################################### # Validate input filenames ###################################################################### set infiles = ($*:q) set files = () foreach file ($infiles:q) if (! -f $file:q) then echo $bn': File "'$file'" does not exist, skipping' else if (! -r $file:q) then echo $bn': File "'$file'" is unreadable, skipping' else if (! -w $file:q) then echo $bn': File "'$file'" cannot be written, skipping' else set files = ($files:q $file:q) endif end ###################################################################### # Define default strings for next, prev, up ###################################################################### set next = '' set next_gr = '' set prev = '' set prev_gr = '' set up = '' set up_gr = '' set tabin = ' ' set tabin = '' set u = 'outline.html' set marker = '<\!-- silly-next-pointer-comment -->' # UNUSED TITLE PARSING CODE # if (-f $u:q && -r $u:q) then # set utitle = "`grep '
'"$tabin" > $tmp if ($?n) then echo -n ''$next' ' >> $tmp else echo -n $next_gr' ' >> $tmp endif echo -n ''$up' ' >> $tmp if ($?p) then echo -n ''$prev'' >> $tmp else echo -n $prev_gr >> $tmp endif echo "" >> $tmp # cat /dev/null > $tmp2 # if ($?n) then # echo -n 'Next: '$ntitle:q' ' >> $tmp2 # endif # echo -n 'Up: '$utitle:q'' >> $tmp2 # if ($?p) then # echo -n ' Next: '$ptitle:q'' >> $tmp2 # endif # echo "