ó fc@s\ddlZddlZddlZddlZd„Zd„ZedkrXeƒndS(iÿÿÿÿNcCsÕyJtjtjddƒ\}}t|ƒdkrItjddƒ‚nWn9tjk r…}tjt_|GHdGHtjdƒnX|d|d}}t j |ƒ}x$|D]}t j j |t|ƒq±WdS(Nitisnot enough argumentss(usage: findlinksto pattern directory ...i(tgetopttsystargvtlent GetoptErrortNonetstderrtstdouttexittretcompiletostpathtwalktvisit(toptstargstmsgtpattdirstprogtdirname((s1/usr/lib64/python2.7/Tools/scripts/findlinksto.pytmain s  cCs´tjj|ƒrg|(dStjj|ƒr;dG|GHnxr|D]j}tjj||ƒ}y8tj|ƒ}|j|ƒdk r”|GdG|GHnWqBtjk r«qBXqBWdS(Ns descend intos->( R R tislinktismounttjointreadlinktsearchRterror(RRtnamestnametlinkto((s1/usr/lib64/python2.7/Tools/scripts/findlinksto.pyRs  t__main__(R RR RRRt__name__(((s1/usr/lib64/python2.7/Tools/scripts/findlinksto.pyts