diff options
| author | Steph Enders <steph@senders.io> | 2025-12-14 00:29:18 -0500 |
|---|---|---|
| committer | Steph Enders <steph@senders.io> | 2025-12-14 00:29:18 -0500 |
| commit | f5943bb301886984802384fdfcccbb3d97f797b7 (patch) | |
| tree | 7bc0c0265cbc4fd072d57a81fb34509f6b60259c | |
| parent | b7d58f5ca6bced94c3e031c4f53f377605367039 (diff) | |
Update ssync-queue to remove bash specific substititions
Add missing config option in ssync.5
Release 2.1.1
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | docs/ssync.5 | 3 | ||||
| -rwxr-xr-x | ssync-queue | 9 |
3 files changed, 10 insertions, 4 deletions
@@ -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 |