rpms/kernel/F-10/scripts make-alsa-patch.sh,NONE,1.1

Chuck Ebbert cebbert at fedoraproject.org
Sun Nov 30 07:22:12 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-10/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12731/scripts

Added Files:
	make-alsa-patch.sh 
Log Message:
add script to turn ALSA tarball into a patch


--- NEW FILE make-alsa-patch.sh ---
#! /bin/sh

ALSA_CMD=$0

err_exit() {
	echo $1
	echo "Usage: " $ALSA_CMD " <ALSA tar file> <kernel src tree>"
	echo "Note: The files a and b must not exist in the current dir"
	exit $2
}

ALSA_TAR=$1
[ -z $ALSA_TAR ] && err_exit "No ALSA tar file specified" 1
[ -f $ALSA_TAR ] || err_exit "ALSA tar file does not exist" 1
ALSA_DIR=${ALSA_TAR%.tar.bz2}
[ -f $ALSA_DIR ] && err_exit "ALSA directory already exists" 1
[ -f a ] && err_exit "File a exists" 1

KRNL_DIR=$2
[ -z $KRNL_DIR ] && err_exit "No kernel source tree specified" 2
[ -d $KRNL_DIR ] || err_exit "Kernel source tree does not exist" 2
[ -f b ] && err_exit "File b exists" 2

tar xjf $ALSA_TAR
ln -s $KRNL_DIR a
ln -s $ALSA_DIR/alsa-kernel b

cd b
rm -Rf scripts
mkdir ../temp1 ../temp2
mv include ../temp1/sound
mv Documentation ../temp1
mv * ../temp2
mkdir include
mv ../temp1/sound include
mv ../temp1/Documentation .
mkdir sound
mv ../temp2/* sound

cd -
diff -uprP a b | grep -v "^Only in" >linux-2.6-${ALSA_DIR}.patch

rm a b
rm -Rf $ALSA_DIR




More information about the fedora-extras-commits mailing list