| 1 | # |
| 2 | if ($#argv < 1) then |
| 3 | echo 'Usage: install <-me file list>' |
| 4 | exit |
| 5 | endif |
| 6 | echo stripping and installing $* |
| 7 | foreach i ($*) |
| 8 | echo ${1}: |
| 9 | ed $i << 'EOF' |
| 10 | 1a |
| 11 | %beginstrip% |
| 12 | . |
| 13 | g/%beginstrip%/d |
| 14 | i |
| 15 | .\" This version has had comments stripped; an unstripped version is available. |
| 16 | . |
| 17 | +,$g/[. ]\\".*/s/// |
| 18 | g/[ ][ ]*$/s/// |
| 19 | g/^$/d |
| 20 | g/\\n@/d |
| 21 | w _mac_temp_ |
| 22 | q |
| 23 | 'EOF' |
| 24 | if ($i == tmac.e) then |
| 25 | cp _mac_temp_ /usr/lib/tmac.e |
| 26 | else |
| 27 | cp _mac_temp_ /usr/lib/me/$i |
| 28 | endif |
| 29 | rm _mac_temp_ |
| 30 | end |
| 31 | cp revisions /usr/lib/me/revisions |
| 32 | echo "Done" |
| 33 | exit |
| 34 | |
| 35 | |