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.

73 lines
3.2KB

  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. ###########################################################################################
  31. # remove old stuff
  32. rm -f /etc/apt/sources.list.d/kxstudio-debian.list
  33. rm -f /etc/apt/sources.list.d/kxstudio-debian.new.list
  34. rm -f /etc/apt/sources.list.d/kxstudio-debian.gcc5.list
  35. rm -f /etc/apt/sources.list.d/kxstudio-debian.gcc5plus.list
  36. rm -f /etc/apt/sources.list.d/kxstudio-external.list
  37. rm -f /etc/apt/sources.list.d/kxstudio-free.list
  38. rm -f /etc/apt/sources.list.d/kxstudio-free.gcc5.list
  39. rm -f /etc/apt/sources.list.d/kxstudio-non-free.list
  40. ###########################################################################################
  41. # Fix for Ubuntu version upgrades messing up stuff
  42. VERSIONS=("cosmic" "disco" "eoan" "focal" "impish" "jammy" "kinetic" "lunar" "mantic" "noble" "oracular" "plucky")
  43. for VERSION in ${VERSIONS[@]}; do
  44. sed "s/ $VERSION / bionic /" -i /etc/apt/sources.list.d/kxstudio-debian-ppas.list
  45. sed "s/ $VERSION / focal /" -i /etc/apt/sources.list.d/kxstudio-debian-ppas-2.list
  46. rm -f /etc/apt/sources.list.d/kxstudio-debian-libs-"$VERSION".list
  47. rm -f /etc/apt/sources.list.d/kxstudio-debian-music-"$VERSION".list
  48. rm -f /etc/apt/sources.list.d/kxstudio-debian-plugins-"$VERSION".list
  49. rm -f /etc/apt/sources.list.d/kxstudio-debian-apps-"$VERSION".list
  50. rm -f /etc/apt/sources.list.d/kxstudio-debian-kxstudio-"$VERSION".list
  51. rm -f /etc/apt/sources.list.d/kxstudio-debian-ubuntus-"$VERSION".list
  52. done
  53. ###########################################################################################