From f5943bb301886984802384fdfcccbb3d97f797b7 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Sun, 14 Dec 2025 00:29:18 -0500 Subject: Update ssync-queue to remove bash specific substititions Add missing config option in ssync.5 Release 2.1.1 --- VERSION | 2 +- docs/ssync.5 | 3 +++ ssync-queue | 9 ++++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 7ddf525..5f8c49b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -"December 2025" "2.1.0" \ No newline at end of file +"December 2025" "2.1.1" \ No newline at end of file diff --git a/docs/ssync.5 b/docs/ssync.5 index fee2fe6..c0e3caf 100644 --- a/docs/ssync.5 +++ b/docs/ssync.5 @@ -25,6 +25,9 @@ identity file used when connecting to remote hosts. See .MR ssh_config 5 for more information on identity files and configurations. .TP +.BI local_root_dir " directory" +The root directory on the local host to be indexed. +.TP .BI output_files_dir " directory" Directory the index and queue outputs will be written to. The recommended value is .IR $XDG_SHARE_DIR/ssync/runs/ diff --git a/ssync-queue b/ssync-queue index 021c1c3..2063420 100755 --- a/ssync-queue +++ b/ssync-queue @@ -83,7 +83,7 @@ remote_index_filenames_file=$queue_tmp_dir/remote_filenames.idx verbose_log "Writing remote index filenames to $remote_index_filenames_file" cat $REMOTE_FILE_ARG | xargs -I{} basename {} > $remote_index_filenames_file original_line_count=$(lines $REMOTE_FILE_ARG) -unique_line_count=$(lines <(sort -u $remote_index_filenames_file)) +unique_line_count=$(sort -u $remote_index_filenames_file | lines) verbose_log "Remote index contains $unique_line_count unique filenames out of $original_line_count indexed files" if [ $original_line_count != $unique_line_count ]; then @@ -91,9 +91,12 @@ if [ $original_line_count != $unique_line_count ]; then fi # find which filenames are unique to the remote +local_sorted=$queue_tmp_dir/local_sorted.idx +remote_sorted=$queue_tmp_dir/remote_sorted.idx remote_only_filenames_file=$queue_tmp_dir/remote_only_filenames.idx -comm -23 <(sort $remote_index_filenames_file) <(sort $LOCAL_FILE_ARG) \ - > $remote_only_filenames_file +sort $LOCAL_FILE_ARG > $local_sorted +sort $remote_index_filenames_file > $remote_sorted +comm -23 $remote_sorted $local_sorted > $remote_only_filenames_file verbose_log "Found $(lines $remote_only_filenames_file) remote only files" # push matching files into queue -- cgit v1.2.3-54-g00ecf