2005-06-29 10:26:52 +04:00
|
|
|
#!/bin/bash
|
2005-06-29 10:30:58 +04:00
|
|
|
#
|
|
|
|
# receive
|
|
|
|
#
|
|
|
|
# This script takes the zip files generated by ship, and puts them
|
|
|
|
# in the proper places in a Linux kernel tree.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2005-06-29 10:26:52 +04:00
|
|
|
|
|
|
|
DUMPDIR=/root/received
|
|
|
|
|
|
|
|
LINUXDIR=/root/linux/
|
|
|
|
|
|
|
|
SRCDIR=/root/desk
|
|
|
|
|
|
|
|
ACPISUBDIRS="utilities dispatcher events hardware executer namespace\
|
|
|
|
parser resources tables debugger"
|
|
|
|
|
|
|
|
ACPIVER="linuxdebug"
|
|
|
|
|
2005-06-29 10:31:17 +04:00
|
|
|
if [ -n "$1" -a "$1" = "new" ]; then
|
|
|
|
LINUXVER="linux-new"
|
|
|
|
else
|
|
|
|
LINUXVER="linux"
|
|
|
|
fi
|
|
|
|
|
2005-06-29 10:26:52 +04:00
|
|
|
echo Clearing $DUMPDIR
|
|
|
|
rm -rf $DUMPDIR
|
|
|
|
mkdir $DUMPDIR
|
|
|
|
mkdir -p $DUMPDIR/drivers/acpi
|
|
|
|
|
|
|
|
echo "Unzipping to $DUMPDIR"
|
|
|
|
unzip $SRCDIR/$ACPIVER.zip -d $DUMPDIR/drivers/acpi >/dev/null
|
2005-06-29 10:31:17 +04:00
|
|
|
unzip $SRCDIR/$LINUXVER.zip -d $DUMPDIR >/dev/null
|
2005-06-29 10:26:52 +04:00
|
|
|
|
|
|
|
echo Flattening directory structure
|
|
|
|
mv $DUMPDIR/drivers/acpi/interpreter/* $DUMPDIR/drivers/acpi
|
|
|
|
rmdir $DUMPDIR/drivers/acpi/interpreter
|
|
|
|
rm -rf $DUMPDIR/drivers/acpi/ia64
|
|
|
|
|
|
|
|
echo Deleting extraneous files/dirs
|
|
|
|
rm -f $DUMPDIR/drivers/acpi/utilities/utclib.c
|
|
|
|
rm -f $DUMPDIR/drivers/acpi/parser/psfind.c
|
|
|
|
rm -f $DUMPDIR/drivers/acpi/include/platform/acwin.h
|
|
|
|
rm -f $DUMPDIR/drivers/acpi/include/platform/acefi.h
|
|
|
|
rm -f $DUMPDIR/drivers/acpi/include/platform/acmsvc.h
|
|
|
|
rm -f $DUMPDIR/drivers/acpi/include/platform/acfreebsd.h
|
|
|
|
find $DUMPDIR -name "*.scc" |xargs rm
|
|
|
|
|
|
|
|
echo Copying Subdirectory Makefiles
|
|
|
|
for i in $ACPISUBDIRS; do
|
|
|
|
cp $DUMPDIR/drivers/acpi/subdirectories/Makefile \
|
|
|
|
$DUMPDIR/drivers/acpi/$i
|
|
|
|
done
|
|
|
|
rm -rf $DUMPDIR/drivers/acpi/subdirectories
|
|
|
|
|
2005-06-29 10:31:17 +04:00
|
|
|
#echo Moving OSPM includes to include directory
|
|
|
|
#mkdir -p $DUMPDIR/drivers/acpi/ospm/include
|
|
|
|
#find $DUMPDIR/drivers/acpi/ospm -name "*.h" | xargs -i mv {} \
|
|
|
|
# $DUMPDIR/drivers/acpi/ospm/include
|
2005-06-29 10:26:52 +04:00
|
|
|
|
|
|
|
echo Fixing line-termination
|
|
|
|
(cd $DUMPDIR;d2u) >/dev/null
|
|
|
|
|
|
|
|
echo Fixing permissions
|
|
|
|
chmod -R a-x $DUMPDIR
|
|
|
|
chmod -R u+rw $DUMPDIR
|
|
|
|
find $DUMPDIR -type d|xargs chmod a+x
|
|
|
|
|
|
|
|
echo "Copying to acpi directory"
|
|
|
|
rm -rf $LINUXDIR/drivers/acpi
|
|
|
|
cp -r $DUMPDIR/* $LINUXDIR
|
|
|
|
|
|
|
|
echo Done.
|
|
|
|
|