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.

reinstall 1.2 KiB

8 maanden geleden
8 maanden geleden
8 maanden geleden
8 maanden geleden
8 maanden geleden
8 maanden geleden
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. vMaj=`cut -d. -f1 VERSION`
  3. vMin=`cut -d. -f2 VERSION`
  4. WPIVERSION=$vMaj.$vMin
  5. ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
  6. if [ -f /etc/os-release ]; then
  7. # load vars from /etc/os-release
  8. . /etc/os-release
  9. if [ "$ID" = "raspbian" ] || [ "$ID" = "debian" ] || [ "$ID" = "linuxmint" ]; then
  10. if [ "$ID" = "raspbian" ]; then
  11. echo OS: Raspberry Pi OS
  12. else
  13. echo OS: Debian
  14. fi
  15. echo using all in one deb-package
  16. echo ============================
  17. echo
  18. sudo apt -y remove wiringpi
  19. ./build clean
  20. ./build debian
  21. mv debian-template/wiringpi_${WPIVERSION}_${ARCH}.deb .
  22. sudo apt install ./wiringpi_${WPIVERSION}_${ARCH}.deb
  23. elif [ "$ID" = "debian" ] || [ "$ID" = "linuxmint" ]; then
  24. echo OS: Ubuntu/Mint
  25. echo using 3 deb-package
  26. echo ===================
  27. echo
  28. sudo apt -y remove libwiringpi2
  29. sudo apt -y remove libwiringpi3
  30. sudo apt -y remove wiringpi libwiringpi-dev
  31. ./build clean
  32. ./build ubuntu
  33. #mv debian-template/wiringpi_${WPIVERSION}_armhf.deb .
  34. #sudo apt install ./wiringpi_${WPIVERSION}_armhf.deb
  35. fi
  36. else
  37. echo OS unknown, exit
  38. exit
  39. fi