目錄表

Using diff to upgrade dokuwiki

Download source code

http://www.splitbrain.org/projects/dokuwiki 下載正在使用的版本的 source code,以及新版本的 source code。

wget "http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-[Version].tgz"

For example:

wget "http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-rc2007-05-24.tgz"
wget "http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-2007-06-26b.tgz"

Unpack

tar -zxf dokuwiki-[Version].tgz

For example:

tar -zxf dokuwiki-rc2007-05-24.tgz
tar -zxf dokuwiki-2007-06-26b.tgz

Create patch

diff -Naur [Old Version] [New Version] > wiki.diff

For example:

diff -Naur dokuwiki-rc2007-05-24 dokuwiki-2007-06-26b > wiki.diff

Apply patch

進入程式所在資料夾,通常是 public_html。

Test

patch -p1 <../wiki.diff --dry-run

會顯示所有受到更動檔案。

Apply

patch -p1 <../wiki.diff