testing repo
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.

123 lines
5.2 KiB

2 years ago
  1. #!/bin/bash
  2. if ! [ -x "$(command -v dialog)" ]; then
  3. echo 'Error: dialog not installed, please install that you donkey'
  4. echo 'Trying to auto install it enter sudo password if necessary'
  5. if ! [ -x "$(command -v apt)" ]; then
  6. echo "Oge this aint a debian machine"
  7. else
  8. echo "Debian based distro detected, installing dialog"
  9. sudo apt install dialog
  10. fi
  11. if ! [ -x "$(command -v pacman)" ]; then
  12. echo "this aint archlinux aswell, what madness are you trying to install this on?"
  13. else
  14. sudo pacman -S dialog --noconfirm
  15. fi
  16. fi
  17. dialog --backtitle "crt-quickdep" --title "itl_chorus client installer" --msgbox "This installer is still in beta! Use at your own risk!" 6 58
  18. dialog --backtitle "crt-quickdep" --title "itl_chorus client installer" --msgbox "Please make sure that you are connected to the internet!\nOtherwise the installer will fail!" 6 60
  19. HEIGHT=15
  20. WIDTH=70
  21. CHOICE_HEIGHT=4
  22. BACKTITLE="crt-quickdep"
  23. TITLE="itl_chorus client installer"
  24. MENU="Choose the appropriate installer please:"
  25. OPTIONS=(1 "32bit binary (i686 Ubuntu 16)"
  26. 2 "64bit binary (Archlinux)"
  27. 3 "Compile from source and more options (todo)")
  28. CHOICE=$(dialog --clear \
  29. --backtitle "$BACKTITLE" \
  30. --title "$TITLE" \
  31. --menu "$MENU" \
  32. $HEIGHT $WIDTH $CHOICE_HEIGHT \
  33. "${OPTIONS[@]}" \
  34. 2>&1 >/dev/tty)
  35. clear
  36. case $CHOICE in
  37. 1)
  38. dialog --title "crt quickdep" \
  39. --yesno "Would you like to install Synfone2 for i686 32bit Ubuntu 16 machines?" 7 60
  40. result=$?
  41. case $result in
  42. 0)
  43. clear
  44. echo "Yea uhm this installer hasent been finished lol sucks to be you I guess it doesnt really automate the run of the program on startup"
  45. echo "Also keep in mind that you need to be a sudoer otherwise this installer cant install dependencies for ya you know~"
  46. echo "Make sure your internet connection works otherwise it will die lmeo"
  47. sleep 10
  48. sudo apt update
  49. sudo apt install wget alsa pulseaudio libasound2-dev unzip
  50. cd ~||exit
  51. wget https://512mb.org/files/itl_chorus/bin/acer-client-32bit.zip
  52. unzip ./acer-client-32bit.zip
  53. cd ./acer-client-32bit ||exit
  54. ./synfone client ./gens/test.gen
  55. #touch .profile
  56. #mv ./.profile ./.profile-backup
  57. ;;
  58. 1) dialog --title "Installation canceled" --msgbox "Okay uhm great i guess?" 5 40;clear ;;
  59. 255) echo "Action Cancelled – Presssed [ESC] key.";;
  60. esac
  61. echo "Binary Acer netbook installer (i686 32bit) Should work on most i686 32bit machines however"
  62. ;;
  63. 2)
  64. dialog --title "crt quickdep" \
  65. --yesno "Would you like to install Synfone2 binary for 64bit Archlinux machine? )" 7 60
  66. result=$?
  67. case $result in
  68. 0)
  69. clear
  70. echo "Starting installer, please dont touch your damn keyboard!"
  71. echo "You will be prompted for your sudo password, so i hope your account is a sudoer bruh"
  72. echo "Also you wont get any audio if your using pipewire as of now, so use pulse"
  73. echo "Please make sure that you are connected to the internet! Otherwise this garbage will crash lol"
  74. sleep 10
  75. cd ~ ||exit
  76. sudo pacman -Syyy
  77. sudo pacman -S rust unzip pulseaudio-alsa
  78. wget https://512mb.org/files/itl_chorus/bin/hp-client-64bit.zip
  79. unzip ./hp-client-64bit.zip
  80. cd ./hp-client-64bit ||exit
  81. chmod a+x synfone
  82. echo "installation complete, well the basic one atleast. Autosignon and autostarts will be added later (tm) to this installer!"
  83. dialog --title "crt quickdep" \
  84. --yesno "Would you like to configure autostart? (Press no to test run synfone2 and ESC to exit)" 7 60
  85. autostart=$?
  86. case $autostart in
  87. 0)
  88. clear #todo
  89. echo 'Yea i didnt code this yet'
  90. ;;
  91. 1)
  92. clear #todo
  93. echo 'Yea i didnt code this yet'
  94. ;;
  95. 255)
  96. clear #todo
  97. echo 'Yea i didnt code this yet'
  98. ;;
  99. esac
  100. ;;
  101. 1) dialog --title "Installation canceled" --msgbox "Okay uhm great i guess?" 5 40;clear ;;
  102. 255) echo "Action Cancelled – Presssed [ESC] key.";;
  103. esac
  104. echo "Binary HP desktop installer (amd64 64bit) Should work on most machines"
  105. ;;
  106. 3)
  107. dialog --title "crt quickdep" \
  108. --yesno "You do realize that this isnt done yet right?" 7 60
  109. result=$?
  110. case $result in
  111. 0) clear; echo wow nothing;;
  112. 1) dialog --title "Installation canceled" --msgbox "Okay uhm great i guess?" 5 40;clear ;;
  113. 255) echo "Action Cancelled – Presssed [ESC] key.";;
  114. esac
  115. echo "You chose compile from source"
  116. ;;
  117. esac