Hyppää sisältöön

Diff and Patch

Introduction

Sample scripts to experiment with diff and patch commands.

Status

Ready. Version 1.0

Locations

Home page: http://tsk.iki.fi/sw/diffpatch/

Download and source code: http://tsk.iki.fi/sw/diffpatch/code/

Workflow

Setup starting point: scripts/setup.sh

Store snapshot: scripts/store.sh

Make modifications to tmp/sample

Make patch: scripts/make-diff.sh >patches 42_something.patch

Add apply-patch to scripts/setup.sh script.

Scripts and directories

scripts/setup.sh
Copies sample to tmp directory and apply patches to it.
scripts/copy-original.sh
Copies sample to tmp directory.
scripts/store.sh
Makes snapshot from tmp/sample directory to tmp/snapshot directory.
scripts/restore.sh
Restores snapshot from tmp/snapshot directory to tmp/sample directory.
scripts/make-diff.sh
Makes diff between tmp/snapshot and tmp/sample. A patch can be made using command scripts/make-diff.sh >patches/01_change.patch.
scripts/apply-patch.sh
Applies a patch to tmp/sample directory. A patch an be applied using command scripts/apply-patch.sh <patches/01_change.patch.
scripts/chmod-scripts.sh
Sets execution bit to scripts/*.
scripts/cleanup.sh
Removes tmp directory.
patches/*
Some patch files.
tmp/sample
Working directory. Original sample with patches is copied here and modifications can be made here.
tmp/snapshot
A snapshot copy of tmp/sample directory.

Contact, bugs, ideas, comments, …

My name is Timo Kankare.

Email: timo.kankare@iki.fi

Feel free to contact me, if you have comments, problems, ideas, bug reports or something else related to these scripts.

License

diffpatch - Sample scripts to experiment with diff and patch commands.
Copyright (C) 2017 Timo Kankare <timo.kankare@iki.fi>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.