Modification time: 2006-12-16 14:45:17 -0500
#!/bin/bash
# patchsync: Synchronizes a trunk, a branch, and a patch containing the
# differences between them.
#!/bin/bash
# patchsync: Synchronizes a trunk, a branch, and a patch containing the
# differences between them.
+
+# If I had to update the version in the --version message separately, I would forget.
+PATCHSYNC_VERSION=2.2
+
# usage: patchsync [--dry-run] <staging> [branch | patch]
#
# Patchsync is invoked on a "staging directory", which holds some configuration
# usage: patchsync [--dry-run] <staging> [branch | patch]
#
# Patchsync is invoked on a "staging directory", which holds some configuration
"${COPYOUT[@]}" -i --link-dest="$(wdpp_from branch/)branch-new/" branch-new/ branch/
rm -rf branch-new
}
"${COPYOUT[@]}" -i --link-dest="$(wdpp_from branch/)branch-new/" branch-new/ branch/
rm -rf branch-new
}
- ! [ -e patch-new ] || cmp -s patch-work patch || {
+ ! [ -e patch-new ] || cmp -s patch patch-new || {
hash_file patch-new >patch-new-hash
# Don't use rsync because we might have to write through a symlink.
echo "> patch"
hash_file patch-new >patch-new-hash
# Don't use rsync because we might have to write through a symlink.
echo "> patch"
"${COPYOUT[@]}" -n -i --link-dest="$(wdpp_from branch/)branch-new/" branch-new/ branch/
#rm -rf branch-new
}
"${COPYOUT[@]}" -n -i --link-dest="$(wdpp_from branch/)branch-new/" branch-new/ branch/
#rm -rf branch-new
}
- ! [ -e patch-new ] || cmp -s patch-work patch || {
+ ! [ -e patch-new ] || cmp -s patch patch-new || {
hash_file patch-new >patch-new-hash
# Don't use rsync because we might have to write through a symlink.
echo "> patch"
hash_file patch-new >patch-new-hash
# Don't use rsync because we might have to write through a symlink.
echo "> patch"
function patchsync_help {
cat <<EOF
function patchsync_help {
cat <<EOF
-Patchsync version 2 by Matt McCutchen
+Patchsync version $PATCHSYNC_VERSION by Matt McCutchen
usage: patchsync [--dry-run] <staging> [branch | patch]
patchsync --new <trunk> <patch> <branch> <staging>
Please read the top of the script for complete documentation.
usage: patchsync [--dry-run] <staging> [branch | patch]
patchsync --new <trunk> <patch> <branch> <staging>
Please read the top of the script for complete documentation.