Compare commits

...

5 commits
2.10 ... master

Author SHA1 Message Date
Darko Poljak
b50b3f64dc Update gitignore 2020-11-25 16:21:44 +01:00
Darko Poljak
40dbfbd3a3 Fix test: also count 'current' symlink 2020-11-25 16:20:28 +01:00
Darko Poljak
7d298d2b51 ++changelog 2020-11-25 16:17:29 +01:00
3687267dd7 Merge branch 'fix-current-symlink' into 'master'
Improve 'current' symlink to backup destinations

See merge request ungleich-public/ccollect!16
2020-11-25 16:15:27 +01:00
Jun Futagawa
2ca7598593 Improve 'current' symlink to backup destinations 2020-11-25 11:24:37 +09:00
4 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ doc/*.xml
doc/*/*.xml doc/*/*.xml
*.texi *.texi
*.fo *.fo
*.lock

View file

@ -235,13 +235,13 @@ test-interval-changing: $(CCOLLECT_SOURCE) test-dir-source test-dir-destination-
test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "0" || { cat ${TEST_LOG_FILE}; exit 1; } test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "0" || { cat ${TEST_LOG_FILE}; exit 1; }
printf "3" > ./test/conf/sources/local-with-interval/intervals/daily printf "3" > ./test/conf/sources/local-with-interval/intervals/daily
for x in 1 2 3 4 5; do CCOLLECT_CONF=./test/conf ./ccollect -l ${TEST_LOG_FILE} daily local-with-interval; done for x in 1 2 3 4 5; do CCOLLECT_CONF=./test/conf ./ccollect -l ${TEST_LOG_FILE} daily local-with-interval; done
test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "3" || { cat ${TEST_LOG_FILE}; exit 1; } test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "4" || { cat ${TEST_LOG_FILE}; exit 1; }
printf "5" > ./test/conf/sources/local-with-interval/intervals/daily printf "5" > ./test/conf/sources/local-with-interval/intervals/daily
for x in 1 2 3 4 5 6 7; do CCOLLECT_CONF=./test/conf ./ccollect -l ${TEST_LOG_FILE} daily local-with-interval; done for x in 1 2 3 4 5 6 7; do CCOLLECT_CONF=./test/conf ./ccollect -l ${TEST_LOG_FILE} daily local-with-interval; done
test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "5" || { cat ${TEST_LOG_FILE}; exit 1; } test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "6" || { cat ${TEST_LOG_FILE}; exit 1; }
printf "4" > ./test/conf/sources/local-with-interval/intervals/daily printf "4" > ./test/conf/sources/local-with-interval/intervals/daily
for x in 1 2 3 4 5 6; do CCOLLECT_CONF=./test/conf ./ccollect -l ${TEST_LOG_FILE} daily local-with-interval; done for x in 1 2 3 4 5 6; do CCOLLECT_CONF=./test/conf ./ccollect -l ${TEST_LOG_FILE} daily local-with-interval; done
test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "4" || { cat ${TEST_LOG_FILE}; exit 1; } test "$$(ls -1 /tmp/ccollect/backup-chint | wc -l)" -eq "5" || { cat ${TEST_LOG_FILE}; exit 1; }
printf "3" > ./test/conf/sources/local-with-interval/intervals/daily printf "3" > ./test/conf/sources/local-with-interval/intervals/daily
@printf "\nInterval changing test ended successfully\n" @printf "\nInterval changing test ended successfully\n"

View file

@ -868,7 +868,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
latest_dir="$(ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \ latest_dir="$(ls -${TSORT}p1 "${ddir}" | grep '/$' | head -n 1)" || \
_exit_err "Failed to list content of ${ddir}." _exit_err "Failed to list content of ${ddir}."
ln -snf "${ddir}${latest_dir}" "${ddir}current" || \ ln -snf "${ddir}/${latest_dir}" "${ddir}/current" || \
_exit_err "Failed to create 'current' symlink." _exit_err "Failed to create 'current' symlink."
# #

1
doc/changes/next Normal file
View file

@ -0,0 +1 @@
* Fix 'current' symlink (Jun Futagawa)