[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    qt-copy
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2003-07-01 16:51:19
[Download RAW message or body]

CVS commit by lunakl: 

As long as somebody doesn't make patch 0012 apply -> disabled.


  A            patches/DISABLED   1.1
  M +15 -3     apply_patches   1.3


--- qt-copy/apply_patches  #1.2:1.3
@@ -13,4 +13,5 @@
 patches=`cd patches/ >/dev/null && ls [0-9]*-* | sort`
 applied=
+skipped=
 for file in $patches; do
     if test "${file%\~}" != "$file" -o "${file%\.sav}" != "$file" -o "${file%\.bak}" != "$file"; then
@@ -21,5 +22,15 @@
     fi
     head -n 5 patches/$file | grep '^[\t ]*[Aa]pplied[\t ]*:[\t ]*[Nn][Oo][\t ]*$' >/dev/null
-    if test $? -eq 0; then   # only those having 'applied: no' in the header
+    if test $? -ne 0; then # apply only those having 'applied: no' in the header
+        continue;
+    fi
+    number=`echo $file | sed 's/^\([0-9]*\)-.*/\1/'`
+    numsearch='^[\t ]*'"$number"'[\t ]*$'
+    cat patches/DISABLED | grep "$numsearch" >/dev/null
+    if test $? -eq 0; then
+        skipped="$skipped $file\n"
+        continue; # disabled
+    fi
+    if /bin/true; then # for debugging
         echo -e "\nApplying: $file"
         patch -p0 < patches/$file
@@ -28,10 +39,11 @@
             exit 1
         fi
-        applied="$applied $file\n"
     fi
+    applied="$applied $file\n"
 done
 
-echo -e "\n\n\nDone."
+echo -e "\n\n\nDone.\n"
 echo -e "Applied patches:\n$applied"
+echo -e "Skipped patches:\n$skipped"
 
 exit 0


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic