diff options
author | msmith <msmith@FreeBSD.org> | 2002-02-08 02:16:45 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2002-02-08 02:16:45 +0000 |
commit | f67ec8651dace42e8922d21f2943b9d9f62f56c7 (patch) | |
tree | 0fd91c0ca812634236606a4e16eb4ea503926eea /sys | |
parent | d3aa0af1fe66d07ce4bc93adaa9f46fc34eaf0bd (diff) | |
download | FreeBSD-src-f67ec8651dace42e8922d21f2943b9d9f62f56c7.zip FreeBSD-src-f67ec8651dace42e8922d21f2943b9d9f62f56c7.tar.gz |
Add a helper script used to take an Intel-supplied ACPI CA drop and make it
ready for importing. This should save me from my own over-cleanliness.
Diffstat (limited to 'sys')
-rwxr-xr-x | sys/contrib/dev/acpica/acpica_prep.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/contrib/dev/acpica/acpica_prep.sh b/sys/contrib/dev/acpica/acpica_prep.sh new file mode 100755 index 0000000..2328f0e --- /dev/null +++ b/sys/contrib/dev/acpica/acpica_prep.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# $FreeBSD$ +# +# Unpack an ACPI CA drop and restructure it to fit the FreeBSD layout +# + +src=$1 +wrk=./_acpi_ca_unpack +dst=./acpi_ca_destination + +# files to remove +stripdirs="compiler" +stripfiles="osunixxf.c 16bit.h Makefile a16find.c a16utils.asm a16utils.obj\ + acintel.h aclinux.h acmsvc.h acwin.h acwin64.h getopt.c" + +# pre-clean +echo pre-clean +rm -rf ${wrk} +rm -rf ${dst} +mkdir -p ${wrk} +mkdir -p ${dst} + +# unpack +echo unpack +tar -x -z -f ${src} -C ${wrk} + +# strip files +echo strip +for i in ${stripdirs}; do + find ${wrk} -name ${i} -type d | xargs rm -r +done +for i in ${stripfiles}; do + find ${wrk} -name ${i} -type f -delete +done + +# move files to destination +echo copy +find ${wrk} -type f | xargs -J % mv % ${dst} + +# post-clean +echo post-clean +rm -rf ${wrk}
\ No newline at end of file |