You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
usbip/extract_usbip.sh

20 lines
412 B

#!/bin/sh
if [ "q$1" == "q" ]; then
echo "Usage: $0 <kernel version>"
exit 1
fi
echo "Extracting linux source"
tar -xf "linux-$1".tar.xz
if [ "$?" -ne "0" ]; then
echo "Error extracting kernel source"
exit 1
fi
if [ -d "usbip-$1" ]; then
rm -rf "usbip-$1"
fi
mv "linux-${1}"/tools/usb/usbip "usbip-$1"
echo "Creating usbip archive"
tar -cJvf "usbip-$1".tar.xz "usbip-$1"
rm -rf "linux-$1"
rm -rf "usbip-$1"