External, Non-PPA KXStudio Repository
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.

83 lines
3.5KB

  1. #!/bin/bash
  2. set -e
  3. #DEBHELPER#
  4. ###########################################################################################
  5. # Restore repository files if the user removed them by mistake
  6. if [ ! -f /etc/apt/sources.list.d/kxstudio-debian-ppas.list ]; then
  7. echo "deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu bionic main
  8. #deb-src http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu bionic main
  9. deb http://ppa.launchpad.net/kxstudio-debian/music/ubuntu bionic main
  10. #deb-src http://ppa.launchpad.net/kxstudio-debian/music/ubuntu bionic main
  11. deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu bionic main
  12. #deb-src http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu bionic main
  13. deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu bionic main
  14. #deb-src http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu bionic main
  15. deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu bionic main
  16. #deb-src http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu bionic main
  17. " > /etc/apt/sources.list.d/kxstudio-debian-ppas.list
  18. fi
  19. if [ ! -f /etc/apt/sources.list.d/kxstudio-debian-ppas-2.list ]; then
  20. echo "deb http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu focal main
  21. #deb-src http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu focal main
  22. deb http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu focal main
  23. #deb-src http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu focal main
  24. deb http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu focal main
  25. #deb-src http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu focal main
  26. deb http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu focal main
  27. #deb-src http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu focal main
  28. " > /etc/apt/sources.list.d/kxstudio-debian-ppas-2.list
  29. fi
  30. if [ ! -f /etc/apt/sources.list.d/kxstudio-free.list ]; then
  31. echo "deb [arch=amd64,i386] https://kx.studio/repo/ stable free
  32. deb [arch=amd64,i386] https://kx.studio/repo/ gcc5 free
  33. " > /etc/apt/sources.list.d/kxstudio-free.list
  34. fi
  35. ###########################################################################################
  36. # remove old stuff
  37. rm -f /etc/apt/sources.list.d/kxstudio-debian.list
  38. rm -f /etc/apt/sources.list.d/kxstudio-debian.new.list
  39. rm -f /etc/apt/sources.list.d/kxstudio-debian.gcc5.list
  40. rm -f /etc/apt/sources.list.d/kxstudio-debian.gcc5plus.list
  41. rm -f /etc/apt/sources.list.d/kxstudio-external.list
  42. rm -f /etc/apt/sources.list.d/kxstudio-free.list
  43. rm -f /etc/apt/sources.list.d/kxstudio-free.gcc5.list
  44. ###########################################################################################
  45. # non-free repo is empty now
  46. rm -f /etc/apt/sources.list.d/kxstudio-non-free.list
  47. ###########################################################################################
  48. # Fix for Ubuntu version upgrades messing up stuff
  49. VERSIONS=("cosmic" "disco" "eoan" "focal" "impish" "jammy")
  50. for VERSION in ${VERSIONS[@]}; do
  51. sed "s/ $VERSION / bionic /" -i /etc/apt/sources.list.d/kxstudio-debian-ppas.list
  52. sed "s/ $VERSION / focal /" -i /etc/apt/sources.list.d/kxstudio-debian-ppas-2.list
  53. rm -f /etc/apt/sources.list.d/kxstudio-debian-libs-"$VERSION".list
  54. rm -f /etc/apt/sources.list.d/kxstudio-debian-music-"$VERSION".list
  55. rm -f /etc/apt/sources.list.d/kxstudio-debian-plugins-"$VERSION".list
  56. rm -f /etc/apt/sources.list.d/kxstudio-debian-apps-"$VERSION".list
  57. rm -f /etc/apt/sources.list.d/kxstudio-debian-kxstudio-"$VERSION".list
  58. rm -f /etc/apt/sources.list.d/kxstudio-debian-ubuntus-"$VERSION".list
  59. done
  60. ###########################################################################################