Added legacy option for systems with older linux headers
This commit is contained in:
parent
30c45ecef3
commit
fe48a15f6c
1 changed files with 20 additions and 0 deletions
20
libgpiod.sh
20
libgpiod.sh
|
|
@ -6,6 +6,21 @@
|
||||||
# chmod +x libgpiod.sh
|
# chmod +x libgpiod.sh
|
||||||
# ./libgpiod.sh
|
# ./libgpiod.sh
|
||||||
|
|
||||||
|
is_legacy=0
|
||||||
|
|
||||||
|
# Loop through arguments and process them
|
||||||
|
for arg in "$@"
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-l|--legacy)
|
||||||
|
is_legacy=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
echo "Installing build requirements - this may take a few minutes!"
|
echo "Installing build requirements - this may take a few minutes!"
|
||||||
echo
|
echo
|
||||||
|
|
@ -35,6 +50,11 @@ echo
|
||||||
cd "$build_dir"
|
cd "$build_dir"
|
||||||
git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git .
|
git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git .
|
||||||
|
|
||||||
|
if test $is_legacy = 1; then
|
||||||
|
git checkout v1.4.2 -b v1.4.2
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Building libgpiod"
|
echo "Building libgpiod"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue