rpms/kernel/devel/scripts sort-config,1.3,1.4

Chuck Ebbert cebbert at fedoraproject.org
Wed Aug 19 12:24:34 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30379

Modified Files:
	sort-config 
Log Message:
show what the input option became in the target


Index: sort-config
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/scripts/sort-config,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- sort-config	17 Aug 2009 10:36:31 -0000	1.3
+++ sort-config	19 Aug 2009 12:24:33 -0000	1.4
@@ -78,7 +78,7 @@ cat ${SRCFILE} | while read TEXT ; do
          if [ "${TEXT:0:7}" = "CONFIG_" ] ; then
             OPTNAME=${TEXT%%=*}
          elif [ "${TEXT:0:9}" = "# CONFIG_" ] ; then
-            OPTNAME=${TEXT%"is not set"}
+            OPTNAME=${TEXT%" is not set"}
             OPTNAME=${OPTNAME#\# }
          fi
          if [ "$OPTNAME" ] ; then
@@ -87,12 +87,18 @@ cat ${SRCFILE} | while read TEXT ; do
                   [ "$DEBUG" ] && echo "looking for ->" "$FINDTEXT"
                   LINE=$(grep -n "$FINDTEXT" $TGTFILE | head -1 | cut -f 1 -d ':')
                   if [ "$LINE" ] ; then
+                     CHANGED=$(grep "$FINDTEXT" $TGTFILE | head -1)
                      if [ "$FORCE" ] ; then
-                        TEXT=$(grep "$FINDTEXT" $TGTFILE | head -1)
+                        TEXT="$CHANGED"
                         [ "$DEBUG" ] && echo 'forced      ->' "$TEXT"
                      else
                         if [ "$ADDCOMMENT" ] ; then
-                           COMMENT="# -- Next option was changed in target line $LINE --"
+                           if [ ${CHANGED:0:1} = '#' ] ; then
+                              NEWOPT="not set"
+                           else
+                              NEWOPT=${CHANGED#$OPTNAME}
+                           fi
+                           COMMENT="# -- Next option changed to \"${NEWOPT}\" at target line $LINE --"
                         fi
                      fi
                   fi




More information about the fedora-extras-commits mailing list