概要
ソースコードなどにパッチ(修正)を適用するコマンドツール。使い方
パッチの作成→適用→取戻の一連の例(一連の流れを行う前の状況確認) guest@debian5:~$ ls v1.0.0 v1.0.1 guest@debian5:~$ cat v1.0.0/Readme Good Morning Readme v1.0.0 guest@debian5:~$ cat v1.0.1/Readme Good Morning, every one! Readme v1.0.1 (パッチを作成) guest@debian5:~$ diff -Nru v1.0.0 v1.0.1 > patch.diff guest@debian5:~$ cat patch.diff diff -Nru v1.0.0/Readme v1.0.1/Readme --- v1.0.0/Readme 2009-08-11 20:41:00.000000000 +0900 +++ v1.0.1/Readme 2009-08-11 20:41:28.000000000 +0900 @@ -1,2 +1,2 @@ -Good Morning -Readme v1.0.0 +Good Morning, every one! +Readme v1.0.1 (パッチをv1.0.0ディレクトリに適用) guest@debian5:~$ patch -d v1.0.0 < patch.diff patching file Readme guest@debian5:~$ cat v1.0.0/Readme Good Morning, every one! Readme v1.0.1 guest@debian5:~$ cat v1.0.1/Readme Good Morning, every one! Readme v1.0.1 (v1.0.0ディレクトリに当てたパッチを外す) guest@debian5:~$ patch -R -d v1.0.0 < patch.diff patching file Readme guest@debian5:~$ cat v1.0.0/Readme Good Morning Readme v1.0.0 guest@debian5:~$ cat v1.0.1/Readme Good Morning, every one! Readme v1.0.1 guest@debian5:~$
仕様
- LSB4.0
以上
0 件のコメント:
コメントを投稿