OSDN Git Service

* compare-debug: Introduce -p flag to preserve .stripped files.
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Nov 2007 06:40:31 +0000 (06:40 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Nov 2007 06:40:31 +0000 (06:40 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130431 138bc75d-0d04-0410-961f-82ee72b054a4

contrib/ChangeLog
contrib/compare-debug

index 8df5f82..e2f4ede 100644 (file)
@@ -1,3 +1,7 @@
+2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
+
+       * compare-debug: Introduce -p flag to preserve .stripped files.
+
 2007-10-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        * texi2pod.pl: Handle @asis.
index f1500b6..6e979e9 100755 (executable)
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+rm='rm -f'
+
+case $1 in
+-p | --preserve)
+  rm='echo preserving'
+  shift
+  ;;
+esac
+
 if test $# != 2; then
   echo 'usage: compare-debug file1.o file2.o' >&2
   exit 1
@@ -60,7 +69,7 @@ else
   status=1
 fi
 
-rm -f "$1.$suf1" "$2.$suf2"
+$rm "$1.$suf1" "$2.$suf2"
 
 trap "exit $status; exit" 0 1 2 15