ó fc@sYddlZddlZdZdZd„Zd„ZedkrUejeƒƒndS(i˙˙˙˙Ns.LINKicCsudttjƒko dkns=dGtjdGdGHdStjdtjd}}ttjƒdkrƒtjd}d}n t}d}tjj|ƒsŽ|dGHdSytj|d ƒWn$tjk rč}|d G|GHdSXtjj ||ƒ}y&tj tjj tj |ƒ|ƒWn:tjk r`}|sP|d G|GHdS|d G|GHnXt |||ƒdS( Niisusage:isoldtree newtree [linkto]iis: not a directoryi˙s: cannot mkdir:s: cannot symlink:s: warning: cannot symlink:( tlentsystargvtLINKtostpathtisdirtmkdirterrortjointsymlinktpardirt linknames(toldtreetnewtreetlinkt link_may_failtmsgtlinkname((s./usr/lib64/python2.7/Tools/scripts/linktree.pytmains6%    & c Cs€trdG|||fGHnytj|ƒ}Wn$tjk rT}|dG|GHdSXx$|D]}|tjtjfkr\tjj||ƒ}tjj||ƒ}tjj||ƒ}tdkrŐ|G|G|GHntjj|ƒretjj |ƒ reytj |dƒd} Wn|dG|GHd} nX| rutjjtj|ƒ}t |||ƒquqxtj ||ƒq\q\WdS(NR s: warning: cannot listdir:ii˙s: warning: cannot mkdir:i( tdebugRtlistdirRtcurdirR RR RtislinkRR R ( toldtnewRtnamesRtnametoldnameRtnewnametok((s./usr/lib64/python2.7/Tools/scripts/linktree.pyR 2s8       t__main__(RRRRRR t__name__texit(((s./usr/lib64/python2.7/Tools/scripts/linktree.pyt s