11#! /bin/bash
22
3- deb_urls=$( bash /usr/share/get-cosmic-deb-urls.sh)
3+ # -----------------------------------------------------------------------------
4+ # This script is used to download and install the COSMIC Desktop Components
5+ # from the COPR repository. Since the components are not available as DEB
6+ # packages, we transform the RPM packages to DEB packages using the alien
7+ # tool and install them using dpkg.
8+ #
9+ # Source: https://copr.fedorainfracloud.org/coprs/ryanabx/cosmic-epoch/
10+ #
11+ # Notes for maintainers:
12+ # - Keep the script up-to-date with the latest versions of the components,
13+ # do not fill the FILES array following the format: <folder>/<rpm>, no
14+ # need to include the base URL.
15+ # -----------------------------------------------------------------------------
416
5- mkdir -p deb_files
6- cd deb_files || exit
17+ echo " Obtaining copr2url..."
18+ wget https://github.com/mirkobrombin/copr2url/releases/download/continuous/copr2url -O /tmp/copr2url
19+ chmod +x /tmp/copr2url
720
8- for url in $deb_urls ; do
9- wget " $url "
21+ echo " Generating list of RPM files..."
22+ FILES=($( /tmp/copr2url /usr/share/cosmic-repos.ini) )
23+
24+ echo " Downloading RPM files..."
25+ for file in " ${FILES[@]} " ; do
26+ wget " ${file} " -P ./rpm_files
1027done
1128
12- sudo dpkg -i ./* .deb
13- sudo apt-get -f install -y
29+ echo " Installing required tools and dependencies..."
30+ sudo apt-get install -y rpm2cpio alien cpio libdisplay-info-bin libseat1 libxkbcommon0 libinput-bin libinput10 dbus xwayland
31+
32+ echo " Converting and installing RPM files..."
33+ cd ./rpm_files || exit
34+ for rpm in * .rpm; do
35+ rpm2cpio " $rpm " | cpio -idmv
36+ sudo alien --scripts --to-deb " $rpm "
37+ done
38+
39+ sudo dpkg -i * .deb
40+ sudo apt-get install -f -y
41+
42+ echo " Installation complete!"
0 commit comments