-#!/bin/bash
+#!/bin/sh
-check-make-ok()
-{
+check_make_ok() {
if [ $? != 0 ]; then
echo ""
echo "Make Failed..."
echo -n "PiFace: " ; make clean
cd ../q2w
echo -n "Quick2Wire: " ; make clean
+ cd ../PiGlow
+ echo -n "PiGlow: " ; make clean
exit
fi
echo "WiringPi Library"
cd wiringPi
sudo make uninstall
- make
- check-make-ok
- sudo make install
- check-make-ok
+ if [ x$1 = "xstatic" ]; then
+ make static
+ check_make_ok
+ sudo make install-static
+ else
+ make
+ check_make_ok
+ sudo make install
+ fi
+ check_make_ok
echo
echo "WiringPi Devices Library"
cd ../devLib
sudo make uninstall
- make
- check-make-ok
- sudo make install
- check-make-ok
+ if [ x$1 = "xstatic" ]; then
+ make static
+ check_make_ok
+ sudo make install-static
+ else
+ make
+ check_make_ok
+ sudo make install
+ fi
+ check_make_ok
echo
echo "GPIO Utility"
cd ../gpio
make
- check-make-ok
+ check_make_ok
sudo make install
- check-make-ok
+ check_make_ok
# echo
# echo "Examples"