projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dropping retired get_x_auth script
[feisty_meow.git]
/
scripts
/
files
/
compare_dirs.sh
diff --git
a/scripts/files/compare_dirs.sh
b/scripts/files/compare_dirs.sh
index 6c700d8f20a31e508b383295a416eb0d1ef812be..65c4f63208412d179d8eeeec021b2561c74f69ec 100644
(file)
--- a/
scripts/files/compare_dirs.sh
+++ b/
scripts/files/compare_dirs.sh
@@
-20,6
+20,8
@@
if [ "$dir1" == "$dir2" ]; then
exit 1
fi
exit 1
fi
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
out1="$(mktemp "$TMP/compare_dirs_output.XXXXXX")"
out2="$(mktemp "$TMP/compare_dirs_output.XXXXXX")"
out1="$(mktemp "$TMP/compare_dirs_output.XXXXXX")"
out2="$(mktemp "$TMP/compare_dirs_output.XXXXXX")"
@@
-44,11
+46,13
@@
fi
if [ -z "$host1" ]; then
# fully local compare location for first dir.
pushd "$dir1" &>/dev/null
if [ -z "$host1" ]; then
# fully local compare location for first dir.
pushd "$dir1" &>/dev/null
+ exit_on_error "compare_dirs: seeking directory $dir1"
find . >"$out1"
popd &>/dev/null
else
# remote compare location for first dir.
ssh "$host1" "cd \"$dir1\" && find ." >"$out1"
find . >"$out1"
popd &>/dev/null
else
# remote compare location for first dir.
ssh "$host1" "cd \"$dir1\" && find ." >"$out1"
+ exit_on_error "compare_dirs: listing remote directory $dir1"
fi
# sort the output from listing the first directory.
fi
# sort the output from listing the first directory.
@@
-57,11
+61,13
@@
sort "$out1" >"$out1".sort
if [ -z "$host2" ]; then
# fully local compare location for second dir.
pushd "$dir2" &>/dev/null
if [ -z "$host2" ]; then
# fully local compare location for second dir.
pushd "$dir2" &>/dev/null
+ exit_on_error "compare_dirs: seeking directory $dir2"
find . >"$out2"
popd &>/dev/null
else
# remote compare location for second dir.
ssh "$host2" "cd \"$dir2\" && find ." >"$out2"
find . >"$out2"
popd &>/dev/null
else
# remote compare location for second dir.
ssh "$host2" "cd \"$dir2\" && find ." >"$out2"
+ exit_on_error "compare_dirs: listing remote directory $dir2"
fi
# sort the output from listing the second directory.
fi
# sort the output from listing the second directory.