以內核(kernel)為例:
--test
|
kernel-new \ (directory)
|
kernel-old \ (directory)
|
patch-update (patched-file)
--test
|
kernel-new \ (directory)
|
kernel-old \ (directory)
|
patch-update (patched-file)
#diff -Nru kernel-old kernel-new > patch-update
--test
|
kernel-new \
|
patch-update
使用patch file,拿到patch file後update到目錄裡
#> cd kernel-old
update
#> patch -p1 < patch-update
或
#> cat patch-update | patch -p1
( --dry-run is good param. if not sure -pX value is )
patch file是壓縮檔或是打包形式
#> bzcat patch-update.bz2 | patch -p1
或
#> zcat patch-update.gz | patch -p1
恢復patch前
#> patch -p1 -R < patch-update
沒有留言:
張貼留言