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

Before creating multiple derivation - component instances

This commit is contained in:
Wouter den Breejen 2007-05-31 17:18:13 +00:00
parent 986a50ac78
commit 9c46444641
9 changed files with 120 additions and 97 deletions

View file

@ -22,10 +22,21 @@ checkouts=( $5 )
#echo nonversionedpaths: $nonversionedpaths
#echo checkouts: $checkouts
#TODO
#
# silence "is already under version control" messages
# after a "revert $x" you can silence the "skipped '$x'"
#
#TODO
i=0
for path in ${subversionedpaths[@]}
do
if test -d $path; then
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");
@ -37,38 +48,43 @@ do
echo "Entering $path"
allsubdirs=( $(echo *) ) #TODO, maybe also add hidden files starting with a '.' , but we dont want to add .svn dirs
subdirs=();
for subdir in ${allsubdirs[@]} #add all, exlucding explicity stated direct versioned-subdirs or explicity stated nonversioned-subdirs
allsubitems=( $(echo *) ) #TODO, maybe also add hidden files starting with a '.' , but we dont want to add .svn dirs
#TODO2 maybe do something with svn stat to speed up ?
subitems=();
for subitem in ${allsubitems[@]} #add all, were going to exlucde explicity stated direct versioned-subdirs or explicity stated nonversioned-subdirs
do #this is only to prevent some warnings, ultimately we would like svn add to have a option 'exclude dirs'
subdir="$(pwd)/$subdir/";
subitem="$(pwd)/$subitem";
if test -d $subitem; then #the subitem (file or a dir) may be a dir, so we add a / to the end
subitem="$subitem/";
fi
exclude=0;
for svnp in ${subversionedpaths[@]} #check if the subdir is in the list of subverioned paths
for svnp in ${subversionedpaths[@]} #check if the subitem is in the list of subverioned paths
do
if [ "$svnp" = "$subdir" ]; then
if [ "$svnp" = "$subitem" ]; then
exclude=1;
#echo "exclude versioned $svnp"
fi
done
for nonvp in ${nonversionedpaths[@]} #check if the subdir is in the list of dirs that aren't supposed to be versioned
for nonvp in ${nonversionedpaths[@]} #check if the subitem is in the list of dirs that aren't supposed to be versioned
do
if [ "$nonvp" = "$subdir" ]; then
if [ "$nonvp" = "$subitem" ]; then
exclude=1;
#echo "exclude nonversioned $svnp"
fi
done
if [ $exclude = 0 ]; then #Exclude the subdir if nessecary
subdirs[${#subdirs[*]}]=$subdir
if [ $exclude = 0 ]; then #Exclude the subitem if nessecary
subitems[${#subitems[*]}]=$subitem
fi
done
if [ "$subdirs" != "" ]; then
echo "adding ${subdirs[@]}"
$debug svn add ${subdirs[@]} #add all subdirs
if [ "$subitems" != "" ]; then
echo "adding ${subitems[@]}"
$debug svn add ${subitems[@]} #add all subitems
for revpath in ${nonversionedpaths[@]} #We need to revert sub-sub* dirs, since these havent been excluded
do