1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 04:00:59 +01:00

Fixed a bug in the auto-deleted-checkout part of the commit bash script, Had to use a hack to get bash to support 2D arrays....

This commit is contained in:
Wouter den Breejen 2007-06-07 18:39:22 +00:00
parent 01062b0563
commit 255bf5f04b
3 changed files with 36 additions and 12 deletions

View file

@ -95,8 +95,8 @@ function subversionSingleStateDir {
for item in ${subitems[@]}
do
if test -d $item; then #add or go recursive subitems
$debug svn -N add $item #NON recursively add the dir
if test -d $item; then #add or go recursive subitems
$debug svn -N add $item #NON recursively add the dir
subversionSingleStateDir $item
else
$debug svn add $item
@ -116,9 +116,20 @@ do
if test -d $path; then #if the dir doesnt exist, than we dont hav to do anything
cd $path;
output=$($svnbin stat 2>&1 | grep "is not a working copy");
if [ "$output" != "" ] ; then #if the dir exists but is not yet an svn dir: checkout repos, if it doenst exits (is removed or something) than we dont do anything
$debug ${checkouts[$i]};
#HACK: I cant seem to find a way for bash to parse a 2 dimensional string array as argument, so we use a 1-d array with '|' as seperator
if ! test -d $path/.svn/; then #if the dir exists but is not yet an svn dir: checkout repos, if it doenst exits (is removed or something) than we dont do anything
checkoutcommand="";
while true; do
if [ "${checkouts[$i]}" = "|" ]; then
break
let "i+=1"
fi
checkoutcommand="${checkoutcommand} ${checkouts[$i]}";
let "i+=1"
done
#echo $checkoutcommand;
$debug $checkoutcommand;
fi
if [ "${subversionedpathsCommitBools[$i]}" = "true" ]; then #Check if we need to commit this folder
@ -133,7 +144,6 @@ do
cd - &> /dev/null;
fi
let "i+=1"
done