aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>2002-02-08 02:16:45 +0000
committerMike Smith <msmith@FreeBSD.org>2002-02-08 02:16:45 +0000
commitaafdbb39dc591651eade0ca50b2889aaf51e4e8b (patch)
tree0fd91c0ca812634236606a4e16eb4ea503926eea /sys/contrib/dev
parent80db0611da9943c3974daf2e72e499ddfcfd02fe (diff)
downloadsrc-aafdbb39dc591651eade0ca50b2889aaf51e4e8b.tar.gz
src-aafdbb39dc591651eade0ca50b2889aaf51e4e8b.zip
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.
Notes
Notes: svn path=/head/; revision=90380
Diffstat (limited to 'sys/contrib/dev')
-rwxr-xr-xsys/contrib/dev/acpica/acpica_prep.sh42
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 000000000000..2328f0efb5b1
--- /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