7ec@soddlZddlZddlTejjZdZd ZdZdZdZ e d krke ndS( iN(t*s mkreal errori icCstj|}t|t}tj|}t|d}tj|t|d}x*|jt}|suPn|j |q\W~tj ||dS(Ntrtw( toststattS_IMODEtST_MODEtreadlinktopentunlinktreadtBUFSIZEtwritetchmod(tnametsttmodetlinktotf_intf_outtbuf((s,/usr/lib64/python2.7/Tools/scripts/mkreal.pyt mkrealfiles cCstj|}t|t}tj|}tj|}tj|tj||tj||t tj |}xK|D]C}|tj tj fkrtj t ||t ||qqWdS(N( RRRRRtlistdirR tmkdirR tjointpardirtcurdirtsymlink(RRRRtfilestfilename((s,/usr/lib64/python2.7/Tools/scripts/mkreal.pyt mkrealdirs  cCstjt_tjjtjd}|dkr:d}ntjd}|sjdG|GdGHtjdnd}xg|D]_}tjj|s|dG|dGd GHd}qwtjj |rt |qwt |qwWtj|dS( Nis-ctmkrealisusage:spath ...it:s not a symlink( tsyststderrtstdoutRtpathtbasenametargvtexittislinktisdirRR(tprognametargststatusR((s,/usr/lib64/python2.7/Tools/scripts/mkreal.pytmain-s"       t__main__i( R!RRR$RterrorR RRR-t__name__(((s,/usr/lib64/python2.7/Tools/scripts/mkreal.pyts