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 8384ad849d
.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
This commit is contained in:
parent
c24209028a
commit
88a929cfc0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue