acpica_prep.sh revision 98146
190380Smsmith#!/bin/sh 290380Smsmith# $FreeBSD: head/sys/contrib/dev/acpica/acpica_prep.sh 98146 2002-06-12 14:55:19Z iwasaki $ 390380Smsmith# 490380Smsmith# Unpack an ACPI CA drop and restructure it to fit the FreeBSD layout 590380Smsmith# 690380Smsmith 798146Siwasakiif [ ! $# -eq 1 ]; then 898146Siwasaki echo "usage: $0 acpica_archive" 998146Siwasaki exit 1098146Siwasakifi 1198146Siwasaki 1290380Smsmithsrc=$1 1390380Smsmithwrk=./_acpi_ca_unpack 1490380Smsmithdst=./acpi_ca_destination 1590380Smsmith 1690380Smsmith# files to remove 1798146Siwasakistripdirs="compiler generate" 1890380Smsmithstripfiles="osunixxf.c 16bit.h Makefile a16find.c a16utils.asm a16utils.obj\ 1990380Smsmith acintel.h aclinux.h acmsvc.h acwin.h acwin64.h getopt.c" 2090380Smsmith 2190380Smsmith# pre-clean 2290380Smsmithecho pre-clean 2390380Smsmithrm -rf ${wrk} 2490380Smsmithrm -rf ${dst} 2590380Smsmithmkdir -p ${wrk} 2690380Smsmithmkdir -p ${dst} 2790380Smsmith 2890380Smsmith# unpack 2990380Smsmithecho unpack 3090380Smsmithtar -x -z -f ${src} -C ${wrk} 3190380Smsmith 3290380Smsmith# strip files 3390380Smsmithecho strip 3490380Smsmithfor i in ${stripdirs}; do 3590380Smsmith find ${wrk} -name ${i} -type d | xargs rm -r 3690380Smsmithdone 3790380Smsmithfor i in ${stripfiles}; do 3890380Smsmith find ${wrk} -name ${i} -type f -delete 3990380Smsmithdone 4090380Smsmith 4190380Smsmith# move files to destination 4290380Smsmithecho copy 4390380Smsmithfind ${wrk} -type f | xargs -J % mv % ${dst} 4490380Smsmith 4590380Smsmith# post-clean 4690380Smsmithecho post-clean 4798146Siwasakirm -rf ${wrk} 48