\input docstrip.tex
\askforoverwritefalse
\generate{%
  \file{diagram.sty}{\from{diagram.dtx}{style}}%
  \file{cpdparse.sty}{\from{diagram.dtx}{cpdparse}}%
}
\endbatchfile