Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
hash_backup
Commits
a6064696
Commit
a6064696
authored
Jan 19, 2021
by
Anders Blomdell
Browse files
Sort result of find
parent
a79f4bfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_sha512backup.sh
View file @
a6064696
...
...
@@ -49,22 +49,22 @@ config > "${TESTDIR}/2/TOTALBACKUP.config"
../sha512backup
--xattr
--primary
<
(
config
)
2> /dev/null
# Check that source and dest are equal
diff
-u
<
(
cd
../test
;
find
)
<
(
cd
${
TESTDIR
}
/1/test
;
find
.
)
diff
-u
<
(
cd
../.git/refs
;
find
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find
.
)
diff
-u
<
(
cd
../test
;
find
|
sort
)
<
(
cd
${
TESTDIR
}
/1/test
;
find
|
sort
)
diff
-u
<
(
cd
../.git/refs
;
find
|
sort
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find
|
sort
)
# Delete temporary file
rm
${
TESTFILE
}
# Make sure source and dest differs
!
diff
-u
<
(
cd
../test
;
find
)
<
(
cd
${
TESTDIR
}
/1/test
;
find
.
)
diff
-u
<
(
cd
../.git/refs
;
find
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find
.
)
!
diff
-u
<
(
cd
../test
;
find
|
sort
)
<
(
cd
${
TESTDIR
}
/1/test
;
find
|
sort
)
diff
-u
<
(
cd
../.git/refs
;
find
|
sort
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find
|
sort
)
# Bring dest to sync
../sha512backup
--xattr
--primary
<
(
config
)
2> /dev/null
# Check that source and dest are equal
diff
-u
<
(
cd
../test
;
find
)
<
(
cd
${
TESTDIR
}
/1/test
;
find
.
)
diff
-u
<
(
cd
../.git/refs
;
find
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find
.
)
diff
-u
<
(
cd
../test
;
find
|
sort
)
<
(
cd
${
TESTDIR
}
/1/test
;
find
|
sort
)
diff
-u
<
(
cd
../.git/refs
;
find
|
sort
)
<
(
cd
${
TESTDIR
}
/2/.git/refs
;
find
|
sort
)
# Check that deleted file exists in TRASH
[
-f
${
TESTDIR
}
/1/TRASH/
*
/
${
TESTFILE
}
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment