mirror of
https://github.com/endeavouros-team/PKGBUILDS.git
synced 2026-06-13 01:34:36 +00:00
[eos-downgrade] get CacheDir value from pacman.conf
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
pkgname=eos-downgrade
|
||||
pkgdesc="Downgrade EndeavourOS packages (currently beta quality)."
|
||||
pkgver=0.4
|
||||
pkgrel=2
|
||||
pkgver=0.26
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
license=('GPL')
|
||||
depends=(
|
||||
@@ -20,7 +20,7 @@ source=(
|
||||
$_url/$pkgname
|
||||
)
|
||||
|
||||
sha512sums=('fd504514cbefeb1fc441603706ba9b92488a8054b382754ba7d326b8c453722295b151a2bc9ce2298d43681b2f394b138333ea01e50d3d0e861d3c290cafc7ce')
|
||||
sha512sums=('a2795f69fe9f8bbe5b14d1ee5189a68cbd3186027d91116e6edcc3b2373e638b0aaf3875c8c2d7c619ba8493261f51ec3fc3aa1f1cf4f842b7e675255bcdb058')
|
||||
|
||||
package() {
|
||||
install -Dm755 $pkgname $pkgdir/usr/bin/$pkgname
|
||||
|
||||
@@ -79,7 +79,7 @@ AddLocals() {
|
||||
local tmp
|
||||
local pkg pkgname
|
||||
|
||||
local_filenames=$(/usr/bin/ls -1 /var/cache/pacman/pkg/${pn}-*.{zst,xz} 2>/dev/null | sed 's|^/var/cache/pacman/pkg/||')
|
||||
local_filenames=$(/usr/bin/ls -1 ${cachedir}${pn}-*.{zst,xz} 2>/dev/null | sed "s|^$cachedir||")
|
||||
|
||||
for pkg in $local_filenames ; do
|
||||
pkgname=$(pkg-name-components N "$pkg") # !!!!
|
||||
@@ -143,7 +143,7 @@ Main_eos() {
|
||||
;;
|
||||
esac
|
||||
case "$filespec" in
|
||||
"cache:"*) filespec="/var/cache/pacman/pkg/$( echo "$filespec" | awk '{print $2}')" ;;
|
||||
"cache:"*) filespec="${cachedir}$( echo "$filespec" | awk '{print $2}')" ;;
|
||||
"latest:"*) filespec="$latest_dl_url/$( echo "$filespec" | awk '{print $2}')" ;;
|
||||
"archive:"*) filespec="$archive_dl_url/$( echo "$filespec" | awk '{print $2}')" ;;
|
||||
*)
|
||||
@@ -230,6 +230,7 @@ Main() {
|
||||
local eos_pkgs=$(pacman -Sl endeavouros | awk '{print $2}')
|
||||
|
||||
source /usr/share/endeavouros/scripts/eos-script-lib-yad || return 1
|
||||
local -r cachedir=$(GetCacheDir)
|
||||
|
||||
Options "$@"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user