Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## Pre-Release 1.0.1-beta (31 December, 2024)
* Minor bug fixes, see #5

## Pre-Release 1.0.0-beta (30 December, 2024)
* Minor bug fixes
* Moved the lockfile creation to the exclude folder to avoid write premission
Expand Down
2 changes: 1 addition & 1 deletion opt/mirrorsync/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0-beta
v1.0.1-beta
16 changes: 11 additions & 5 deletions opt/mirrorsync/mirrorsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,24 @@ do
error "no local directory is defined in \"${repoconfig}\". Continuing with the next mirror"
progresscounter=$((progresscounter+3))
continue
elif [ ! -w "$mirrordst" ]; then
error "The path \"${mirrordst}\" is not writable. Continuing with the next mirror"
progresscounter=$((progresscounter+3))
continue
elif [ ! -d "$mirrordst" ]; then
fi

# Check if directory exists, else create it
if [ ! -d "$mirrordst" ]; then
warning "A local path for \"${mirrorname}\" does not exists, will create one"
if [ ! mkdir "$mirrordst" 2>&1 ]; then
error "The path \"${mirrordst}\" could not be created. Continuing with the next mirror"
progresscounter=$((progresscounter+3))
continue
fi
fi

# Validate that the current user can write to this path
if [ ! -w "$mirrordst" ]; then
error "The path \"${mirrordst}\" is not writable. Continuing with the next mirror"
progresscounter=$((progresscounter+3))
continue
fi

# Validate the remotes variable is a array
is_array=$(declare -p remotes | grep '^declare -a')
Expand Down