Skip to content
Snippets Groups Projects
Commit fe2040cd authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

archrelease: Fix SVN error when repository is empty


If trash is empty, `svn rm -q "${trash[@]}"` fails with:

    svn: Try 'svn help' for more info and then
    svn: Not enough arguments provided

This doesn't result in any further malfunction but is kind of confusing
and unexpected. Skipping `svn rm` on an empty trash fixes this.

Reported-by: default avatarAlexander Rødseth <rodseth@gmail.com>
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent a991c9a7
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ for tag in "$@"; do
while read -r file; do
trash+=("repos/$tag/$file")
done < <(svn ls "repos/$tag")
svn rm -q "${trash[@]}"
[[ $trash ]] && svn rm -q "${trash[@]}"
else
mkdir -p "repos/$tag"
svn add --parents -q "repos/$tag"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment