diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-24 12:29:08 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-24 12:39:24 +0300 |
commit | d284ebd48648d6e3681e933af7ae5d3686220d22 (patch) | |
tree | 293132ab028f62ceac07957a5e02c81d3763166d | |
parent | Travis: test_symlinks_remove_symlink_dir (diff) | |
download | config-links-d284ebd48648d6e3681e933af7ae5d3686220d22.tar.gz config-links-d284ebd48648d6e3681e933af7ae5d3686220d22.zip |
more concise directory symlink handling
-rwxr-xr-x | .travis/test.sh | 16 | ||||
-rw-r--r-- | src/db.sh | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/.travis/test.sh b/.travis/test.sh index 81586e4..e8d03b5 100755 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -149,13 +149,13 @@ $test_dest_dir/bar/baz/4.txt->$test_src_dir/%DEST%/bar/baz/4.txt" verify_output "$expected_output" expected_output="$test_alt_dest_dir-> -$test_alt_dest_dir/1.txt->$test_src_dir/%DEST%/1.txt +$test_alt_dest_dir/1.txt->$test_src_dir/%ALT_DEST%/1.txt $test_alt_dest_dir/foo-> -$test_alt_dest_dir/foo/2.txt->$test_src_dir/%DEST%/foo/2.txt +$test_alt_dest_dir/foo/2.txt->$test_src_dir/%ALT_DEST%/foo/2.txt $test_alt_dest_dir/bar-> -$test_alt_dest_dir/bar/3.txt->$test_src_dir/%DEST%/bar/3.txt +$test_alt_dest_dir/bar/3.txt->$test_src_dir/%ALT_DEST%/bar/3.txt $test_alt_dest_dir/bar/baz-> -$test_alt_dest_dir/bar/baz/4.txt->$test_src_dir/%DEST%/bar/baz/4.txt" +$test_alt_dest_dir/bar/baz/4.txt->$test_src_dir/%ALT_DEST%/bar/baz/4.txt" verify_output "$expected_output" "$test_alt_dest_dir" } @@ -206,12 +206,12 @@ $test_dest_dir/bar/baz/4.txt->$test_src_dir/%DEST%/bar/baz/4.txt" verify_output "$expected_output" expected_output="$test_alt_dest_dir-> -$test_alt_dest_dir/1.txt->$test_src_dir/%DEST%/1.txt +$test_alt_dest_dir/1.txt->$test_src_dir/%ALT_DEST%/1.txt $test_alt_dest_dir/foo-> -$test_alt_dest_dir/foo/2.txt->$test_src_dir/%DEST%/foo/2.txt +$test_alt_dest_dir/foo/2.txt->$test_src_dir/%ALT_DEST%/foo/2.txt $test_alt_dest_dir/bar-> $test_alt_dest_dir/bar/baz-> -$test_alt_dest_dir/bar/baz/4.txt->$test_src_dir/%DEST%/bar/baz/4.txt" +$test_alt_dest_dir/bar/baz/4.txt->$test_src_dir/%ALT_DEST%/bar/baz/4.txt" verify_output "$expected_output" "$test_alt_dest_dir" } @@ -236,7 +236,7 @@ $test_dest_dir/1.txt->$test_src_dir/%DEST%/1.txt $test_dest_dir/foo-> $test_dest_dir/foo/2.txt->$test_src_dir/%DEST%/foo/2.txt $test_dest_dir/bar-> -$test_dest_dir/bar->3.txt->$test_src_dir/%DEST%/bar/3.txt +$test_dest_dir/bar/3.txt->$test_src_dir/%DEST%/bar/3.txt $test_dest_dir/bar/baz-> $test_dest_dir/bar/baz/4.txt->$test_src_dir/%DEST%/bar/baz/4.txt" verify_output "$expected_output" @@ -62,7 +62,6 @@ add_entry() { local shared_path="$shared_var_dir" [ "$shared_var_dir" != / ] && shared_path="$shared_path/" shared_path="$shared_path$subpath" - shared_path="$( traverse_path -- "$shared_path" )" local symlink_path="$symlink_var_dir" [ "$symlink_var_dir" != / ] && symlink_path="$symlink_path/" @@ -176,6 +175,7 @@ symlink_points_to_shared_file() { local entry for entry; do local shared_path="${shared_paths[$entry]}" + shared_path="$( traverse_path -- "$shared_path" )" local symlink_path="${symlink_paths[$entry]}" local target_path target_path="$( traverse_path -- "$symlink_path" )" |