acpica_prep.sh (234623) | acpica_prep.sh (235945) |
---|---|
1#!/bin/sh | 1#!/bin/sh |
2# $FreeBSD: head/sys/contrib/dev/acpica/acpica_prep.sh 234623 2012-04-23 23:05:14Z jkim $ | 2# $FreeBSD: head/sys/contrib/dev/acpica/acpica_prep.sh 235945 2012-05-24 23:12:30Z jkim $ |
3# 4# Unpack an ACPI CA drop and restructure it to fit the FreeBSD layout 5# 6 7if [ ! $# -eq 1 ]; then 8 echo "usage: $0 acpica_archive" 9 exit 10fi 11 12src=$1 | 3# 4# Unpack an ACPI CA drop and restructure it to fit the FreeBSD layout 5# 6 7if [ ! $# -eq 1 ]; then 8 echo "usage: $0 acpica_archive" 9 exit 10fi 11 12src=$1 |
13wrk=`realpath ./_acpi_ca_unpack` 14dst=`realpath ./acpi_ca_destination` | 13wrk="$(realpath .)/_acpi_ca_unpack" 14dst="$(realpath .)/acpi_ca_destination" |
15 16# files that should keep their full directory path 17fulldirs="common compiler components include os_specific" 18 19# files to remove 20stripdirs="generate libraries tests tools" 21stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ 22 acos2.h accygwin.h acefi.h acwin.h acwin64.h osunixdir.c \ --- 39 unchanged lines hidden (view full) --- 62find ${wrk} -type f -print | xargs -J % mv % ${dst} 63 64# canonify include paths 65for H in ${src_headers}; do 66 find ${dst} -name "*.[chly]" -type f -print | \ 67 xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/include/$H\>|g" 68done 69for H in ${comp_headers}; do | 15 16# files that should keep their full directory path 17fulldirs="common compiler components include os_specific" 18 19# files to remove 20stripdirs="generate libraries tests tools" 21stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ 22 acos2.h accygwin.h acefi.h acwin.h acwin64.h osunixdir.c \ --- 39 unchanged lines hidden (view full) --- 62find ${wrk} -type f -print | xargs -J % mv % ${dst} 63 64# canonify include paths 65for H in ${src_headers}; do 66 find ${dst} -name "*.[chly]" -type f -print | \ 67 xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/include/$H\>|g" 68done 69for H in ${comp_headers}; do |
70 find ${dst}/common ${dst}/compiler -name "*.[chly]" -type f | \ | 70 find ${dst}/common ${dst}/compiler ${dst}/components \ 71 -name "*.[chly]" -type f | \ |
71 xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/compiler/$H\>|g" 72done 73for H in ${platform_headers}; do 74 find ${dst}/include/platform -name "*.h" -type f -print | \ 75 xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/include/platform/$H\>|g" 76done 77 78# post-clean 79echo post-clean 80rm -rf ${wrk} 81 82# assist the developer in generating a diff 83echo "Directories you may want to 'svn diff':" 84echo " sys/contrib/dev/acpica sys/dev/acpica \\" 85echo " sys/amd64/acpica sys/i386/acpica sys/ia64/acpica sys/x86/acpica \\" 86echo " sys/amd64/include sys/i386/include sys/ia64/include \\" 87echo " sys/boot sys/conf sys/modules/acpi usr.sbin/acpi" | 72 xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/compiler/$H\>|g" 73done 74for H in ${platform_headers}; do 75 find ${dst}/include/platform -name "*.h" -type f -print | \ 76 xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/include/platform/$H\>|g" 77done 78 79# post-clean 80echo post-clean 81rm -rf ${wrk} 82 83# assist the developer in generating a diff 84echo "Directories you may want to 'svn diff':" 85echo " sys/contrib/dev/acpica sys/dev/acpica \\" 86echo " sys/amd64/acpica sys/i386/acpica sys/ia64/acpica sys/x86/acpica \\" 87echo " sys/amd64/include sys/i386/include sys/ia64/include \\" 88echo " sys/boot sys/conf sys/modules/acpi usr.sbin/acpi" |