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