1 #!/bin/ksh -p 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # 27 28 # 29 # Set this to the fully-qualified path to the ACPI CA GIT directory 30 # 31 ACDIR=/tmp/acpica-unix-20091112 32 33 ACSRC=$ACDIR 34 ACINC=$ACDIR/include 35 36 DIFF="diff -w" 37 38 # 39 # Use which_scm to get the current WS path 40 # 41 which_scm | read WS_SCM WSDIR 42 43 WSSRC=usr/src/uts/intel/io/acpica 44 WSHDR=usr/src/uts/intel/sys/acpi 45 ACFILES=/tmp/$$.acfiles 46 SRCDIRS="debugger \ 47 disassembler \ 48 dispatcher \ 49 events \ 50 executer \ 51 hardware \ 52 namespace \ 53 parser \ 54 resources \ 55 tables \ 56 utilities" 57 58 # 59 # 60 # 61 cd $ACSRC ; find $SRCDIRS -type f > $ACFILES ; cd - 62 for i in `<$ACFILES` 63 do 64 if [[ ! -a $WSDIR/$WSSRC/$i ]] 65 then 66 SRCNEW=$SRCNEW\ $i 67 else 68 if (! $DIFF $WSDIR/$WSSRC/$i $ACSRC/$i > /dev/null ) 69 then 70 SRCCHG=$SRCCHG\ $i 71 fi 72 fi 73 done 74 75 # 76 # 77 # 78 cd $ACINC ; find . -type f > $ACFILES ; cd - 79 for i in `<$ACFILES` 80 do 81 if [[ ! -a $WSDIR/$WSHDR/$i ]] 82 then 83 HDRNEW=$HDRNEW\ $i 84 else 85 if (! $DIFF $WSDIR/$WSHDR/$i $ACINC/$i > /dev/null ) 86 then 87 HDRCHG=$HDRCHG\ $i 88 fi 89 fi 90 done 91 92 cd $WSDIR 93 for i in $SRCCHG 94 do 95 targ=$WSSRC/$i 96 cp $ACSRC/$i $targ 97 done 98 99 for i in $SRCNEW 100 do 101 targ=$WSSRC/$i 102 cp $ACSRC/$i $targ 103 chmod +w $targ 104 hg add $targ 105 done 106 107 for i in $HDRCHG 108 do 109 targ=$WSHDR/$i 110 cp $ACINC/$i $targ 111 done 112 113 for i in $HDRNEW 114 do 115 targ=$WSHDR/$i 116 cp $ACINC/$i $targ 117 chmod +w $targ 118 hg add $targ 119 done 120 121 if (! $DIFF $WSDIR/$WSSRC/changes.txt $ACDIR/changes.txt > /dev/null ) 122 then 123 targ=$WSSRC/changes.txt 124 cp $ACDIR/changes.txt $targ 125 fi 126 cd - 127 128 echo New source files: 129 echo $SRCNEW 130 echo New header files: 131 echo $HDRNEW