Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

101 rinda
1.9 KiB

  1. #!/bin/sh
  2. check_make_ok() {
  3. if [ $? != 0 ]; then
  4. echo ""
  5. echo "Make Failed..."
  6. echo "Please check the messages and fix any problems. If you're still stuck,"
  7. echo "then please email all the output and as many details as you can to"
  8. echo " projects@drogon.net"
  9. echo ""
  10. exit 1
  11. fi
  12. }
  13. if [ x$1 = "xclean" ]; then
  14. cd wiringPi
  15. echo -n "wiringPi: " ; make clean
  16. cd ../devLib
  17. echo -n "DevLib: " ; make clean
  18. cd ../gpio
  19. echo -n "gpio: " ; make clean
  20. cd ../examples
  21. echo -n "Examples: " ; make clean
  22. cd Gertboard
  23. echo -n "Gertboard: " ; make clean
  24. cd ../PiFace
  25. echo -n "PiFace: " ; make clean
  26. cd ../q2w
  27. echo -n "Quick2Wire: " ; make clean
  28. cd ../PiGlow
  29. echo -n "PiGlow: " ; make clean
  30. exit
  31. fi
  32. if [ x$1 = "xuninstall" ]; then
  33. cd wiringPi
  34. echo -n "wiringPi: " ; sudo make uninstall
  35. cd ../devLib
  36. echo -n "DevLib: " ; sudo make uninstall
  37. cd ../gpio
  38. echo -n "gpio: " ; sudo make uninstall
  39. exit
  40. fi
  41. echo "wiringPi Build script"
  42. echo "====================="
  43. echo
  44. echo
  45. echo "WiringPi Library"
  46. cd wiringPi
  47. sudo make uninstall
  48. if [ x$1 = "xstatic" ]; then
  49. make static
  50. check_make_ok
  51. sudo make install-static
  52. else
  53. make
  54. check_make_ok
  55. sudo make install
  56. fi
  57. check_make_ok
  58. echo
  59. echo "WiringPi Devices Library"
  60. cd ../devLib
  61. sudo make uninstall
  62. if [ x$1 = "xstatic" ]; then
  63. make static
  64. check_make_ok
  65. sudo make install-static
  66. else
  67. make
  68. check_make_ok
  69. sudo make install
  70. fi
  71. check_make_ok
  72. echo
  73. echo "GPIO Utility"
  74. cd ../gpio
  75. make
  76. check_make_ok
  77. sudo make install
  78. check_make_ok
  79. # echo
  80. # echo "Examples"
  81. # cd ../examples
  82. # make
  83. # cd ..
  84. echo
  85. echo All Done.
  86. echo ""
  87. echo "NOTE: This is wiringPi v2, and if you need to use the lcd, Piface,"
  88. echo " Gertboard, MaxDetext, etc. routines then you must change your"
  89. echo " compile scripts to add -lwiringPiDev"
  90. echo ""