17 lines
354 B
Bash
17 lines
354 B
Bash
#!/bin/bash
|
|
full_version=`uname -r`
|
|
|
|
# Removing flavour from version i.e. generic or server.
|
|
flavour_abi=${full_version#*-}
|
|
flavour=${flavour_abi#*-}
|
|
version=${full_version%-$flavour}
|
|
this="$0_$version"
|
|
|
|
if [ ! -f "$this" ]; then
|
|
echo "$this not found" >&2
|
|
echo "You may need to install linux-tools-$version" >&2
|
|
exit 2
|
|
fi
|
|
|
|
exec "$this" "$@"
|