2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WindowsでSVNチェックアウトした時にシンボリックリンクリンクがファイルになっちゃうのを戻すワンライナー

Posted at

WindowsでSVNチェックアウトした時にシンボリックリンクがファイルになるのを元に戻すワンライナー

今までLinux上でなんでもやってたので気にもしてなかったですし、問題もなかったのですがWindows上で開発環境の構築があったので仮想環境と組み合わせ作成したので、Windows上でSVNチェックアウトを行うと、シンボリックリンクがファイルに置き換わるという(ファイルシステム上、サポートしてないから当たり前?)仕様を知らなくて、なんで動かないんだろう~と悩んでしまいました。

sygwin上からだときっとうまくいくのかなぁと思いつつ、めんどくさいのでSVNで置き換わったファイルをシンボリックリンクに戻すワンライナーです。 (忘れそうなので忘備録)

find . -regex "^\.[^\.]+"  | xargs grep -s 'link ' | perl -nlaF:link  -e 'unlink($F[0]);symlink($F[1],$F[0])'

これで動いたので、きっと大丈夫!

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?