summaryrefslogtreecommitdiff
path: root/archrelease
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-08-19 10:16:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-08-25 11:10:30 +0200
commit40ddf4d44f2d41048ac1543a57feba9d2cf57155 (patch)
tree330f6904baa85c0895ffd2ed28d64b3ae046e998 /archrelease
parentb445920d55a21f23a960f6ef23750f6e13dbed77 (diff)
downloaddevtools-40ddf4d44f2d41048ac1543a57feba9d2cf57155.tar.xz
archrelease: Check for subdirectories early
Ensure we do not mess with version control if there are any subdirectories in the package trunk. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'archrelease')
-rwxr-xr-xarchrelease12
1 files changed, 6 insertions, 6 deletions
diff --git a/archrelease b/archrelease
index ec7545e..0fb3445 100755
--- a/archrelease
+++ b/archrelease
@@ -31,6 +31,12 @@ fi
echo -n "releasing package to ${1}..."
pushd .. >/dev/null
+IFS=$'\n' read -r -d '' -a known_files < <(svn ls "trunk")
+for file in "${known_files[@]}"; do
+ if [[ ${file:(-1)} = '/' ]]; then
+ abort "archrelease: subdirectories are not supported in package directories!"
+ fi
+done
if [[ -d repos/$1 ]]; then
declare -a trash
while read -r file; do
@@ -41,12 +47,6 @@ else
mkdir -p "repos/${1}"
svn add --parents -q "repos/${1}"
fi
-IFS=$'\n' read -r -d '' -a known_files < <(svn ls "trunk")
-for file in "${known_files[@]}"; do
- if [[ ${file:(-1)} = '/' ]]; then
- abort "archrelease: subdirectories are not supported in package directories!"
- fi
-done
for file in "${known_files[@]}"; do
svn copy -q -r HEAD "trunk/$file" "repos/${1}/"
done