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>
This commit is contained in:
parent
b445920d55
commit
40ddf4d44f
12
archrelease
12
archrelease
|
@ -31,6 +31,12 @@ fi
|
||||||
|
|
||||||
echo -n "releasing package to ${1}..."
|
echo -n "releasing package to ${1}..."
|
||||||
pushd .. >/dev/null
|
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
|
if [[ -d repos/$1 ]]; then
|
||||||
declare -a trash
|
declare -a trash
|
||||||
while read -r file; do
|
while read -r file; do
|
||||||
|
@ -41,12 +47,6 @@ else
|
||||||
mkdir -p "repos/${1}"
|
mkdir -p "repos/${1}"
|
||||||
svn add --parents -q "repos/${1}"
|
svn add --parents -q "repos/${1}"
|
||||||
fi
|
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
|
for file in "${known_files[@]}"; do
|
||||||
svn copy -q -r HEAD "trunk/$file" "repos/${1}/"
|
svn copy -q -r HEAD "trunk/$file" "repos/${1}/"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue