Commit 88a929cf authored by Lukas Fleischer's avatar Lukas Fleischer Committed by Pierre Schmitz
Browse files

archrelease: Fix behaviour with non-standard trunk name



Do not hardcode the name of the package trunk directory and accept
varying directory names, such as "gnome-unstable". Regression introduced
in 8384ad84.

Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent c2420902
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ if [[ $(svn status -q) ]]; then
fi

pushd .. >/dev/null
IFS=$'\n' read -r -d '' -a known_files < <(svn ls -r HEAD "trunk")
IFS=$'\n' read -r -d '' -a known_files < <(svn ls -r HEAD "$trunk")
for file in "${known_files[@]}"; do
	if [[ ${file:(-1)} = '/' ]]; then
		abort "archrelease: subdirectories are not supported in package directories!"
@@ -38,7 +38,7 @@ for file in "${known_files[@]}"; do
done

for tag in "$@"; do
	echo -n "copying trunk to ${tag}..."
	echo -n "copying ${trunk} to ${tag}..."

	if [[ -d repos/$tag ]]; then
		declare -a trash
@@ -53,7 +53,7 @@ for tag in "$@"; do
	fi

	for file in "${known_files[@]}"; do
		svn copy -q -r HEAD "trunk/$file" "repos/$tag/"
		svn copy -q -r HEAD "$trunk/$file" "repos/$tag/"
	done

	echo 'done'
@@ -61,7 +61,7 @@ done

echo -n "releasing package..."
printf -v tag_list ", %s" "$@"; tag_list="${tag_list#, }"
svn commit -q -m "archrelease: copy trunk to $tag_list" || abort
svn commit -q -m "archrelease: copy ${trunk} to $tag_list" || abort
echo 'done'

popd >/dev/null