Advertisement
otku

Untitled

Jan 5th, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #!/bin/sh
  2. # Check if root
  3. if [ "$(whoami)" != "root" ]; then
  4. whiptail --msgbox "Sorry you are not root. You must type: sudo sh install.sh" $WT_HEIGHT $WT_WIDTH
  5. exit
  6. fi
  7.  
  8. # Check if raspi-config is installed
  9. if [ $(dpkg-query -W -f='${Status}' raspi-config 2>/dev/null | grep -c "ok installed") -eq 1 ]; then
  10. whiptail --msgbox "Raspi-config is already installed, try upgrading it within raspi-config..." 10 60
  11. else
  12. wget https://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20200601_all.deb -P /tmp
  13. apt-get install libnewt0.52 whiptail parted triggerhappy lua5.1 alsa-utils -y
  14. # Auto install dependancies on eg. ubuntu server on RPI
  15. apt-get install -fy
  16. dpkg -i /tmp/raspi-config_20200601_all.deb
  17. whiptail --msgbox "Raspi-config is now installed, run it by typing: sudo raspi-config" 10 60
  18. fi
  19.  
  20. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement