Skip to content

Commit

Permalink
Persepolis Download Manager: repackage deb without compression for bu…
Browse files Browse the repository at this point in the history
…llseye
  • Loading branch information
theofficialgman committed May 10, 2024
1 parent 7584fc2 commit 9182d9c
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion apps/Persepolis Download Manager/install
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

case "$(get_codename)" in
bullseye)
remove_deb_compression() {
local filename="$1"
local tempdir="$(mktemp -d)"
ar x "${filename}" --output "${tempdir}" || return 1
rm -f "${filename}"
# do NOT change this varible name to PWD as other functions/binaries set that and do not clean up
local CURRDIR="$(pwd)"
cd "${tempdir}" || return 1
mkdir DEBIAN || return 1
package_installed zstd || install_packages zstd || exit 1
tar -xf control.tar.zst -C ./DEBIAN || return 1
tar -xf data.tar.zst || return 1
rm -f control.tar.zst data.tar.zst debian-binary
dpkg-deb --root-owner-group --build -Znone "${tempdir}" "${filename}" || return 1
cd "${CURRDIR}" || return 1
rm -Rf "${tempdir}" || return 1
}
# this will be a no-op if the required dist and component already exists
sudo add-apt-repository "deb http://deb.debian.org/debian bullseye-backports main" -y
# add pin priority for yt-dlp so it will download from the backports repo
Expand All @@ -12,6 +29,9 @@ Pin: release a=bullseye-backports
Pin-Priority: 500
_EOF_"
apt_update
wget -qO /tmp/persepolis.deb https://github.com/persepolisdm/persepolis/releases/download/4.1.0/persepolis_4.1.0.2_all.deb || error "Could not download persepolis"
remove_deb_compression /tmp/persepolis.deb || error "Failed to extract persepolis deb"
install_packages /tmp/persepolis.deb || exit 1
;;
bookworm)
# this will be a no-op if the required dist and component already exists
Expand All @@ -24,8 +44,11 @@ Pin: release a=bookworm-backports
Pin-Priority: 500
_EOF_"
apt_update
install_packages "https://github.com/persepolisdm/persepolis/releases/download/4.1.0/persepolis_4.1.0.2_all.deb" || error "Failed to install persepolis"
;;
*)
install_packages "https://github.com/persepolisdm/persepolis/releases/download/4.1.0/persepolis_4.1.0.2_all.deb" || error "Failed to install persepolis"
;;
esac
install_packages "https://github.com/persepolisdm/persepolis/releases/download/4.1.0/persepolis_4.1.0.2_all.deb" || error "Failed to install persepolis"

echo -e "\nYou may want to install Persepolis Download Manager Integration on your browser. For more info, see here: \e[4mhttps://github.com/persepolisdm/persepolis/wiki/Home-en#extensions\e[0m"

0 comments on commit 9182d9c

Please sign in to comment.