pman


Logs | Files | README | LICENSE | GitLab


1
commit ede07ab85f45eac7f34a6d07f3e51d6462eea052
2
Author: Connor Etherington <[email protected]>
3
Date:   Mon May 16 06:41:22 2022 +0200
4
5
    Update.
6
---
7
 PKGBUILD    | 15 +++++++++++++--
8
 usr/bin/pkd | 35 ++++++++++++++++++-----------------
9
 2 files changed, 31 insertions(+), 19 deletions(-)
10
11
diff --git a/PKGBUILD b/PKGBUILD
12
index 0a8bd9d..89b377e 100644
13
--- a/PKGBUILD
14
+++ b/PKGBUILD
15
@@ -16,8 +16,19 @@ optdepends=(
16
   "python-pip: To download python packages."
17
   "aria2: To download files or torrents from URLs."
18
   )
19
-source=("git+$url.git")
20
-sha256sums=('SKIP')
21
+source=(
22
+  "https://concise.cc/pkg/${pkgname}-${pkgver}-${pkgrel}-$arch.pkg.tar.zst"
23
+  "https://concise.cc/pkg/${pkgname}-${pkgver}-${pkgrel}-$arch.pkg.tar.zst.sig"
24
+  )
25
+sha512sums=(
26
+  '01a68e743d6b22cd1eb6d70dcb9324205feb8acaef9b86fe8c0efa7c315132bc74cddae5755de121266060a510bbdb9f1a0c4aec75a7b0e634a6a9f93357e2c4'
27
+  '9df69caddd1e224e3ecfc08978f9fe7fe19467df9c167824f8d649a646f5c00d8793777d576d1043710a62ae7347f1e28c079f47f003cb14e67eebd9e0290fb8'
28
+  )
29
+md5sums=(
30
+  'f39efddd7c3cd63c97496ce99e3d7000'
31
+  '8f73fd2f4b11d523c9b8d92b326fef8f'
32
+  )
33
+validpgpkeys=('81BACEEBC3EA26E127166E4A819BB92A9A48160E')
34
 
35
 package() {
36
     install -Dm644 usr/share/licenses/${pkgname}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
37
diff --git a/usr/bin/pkd b/usr/bin/pkd
38
index 08e0925..41e9ceb 100755
39
--- a/usr/bin/pkd
40
+++ b/usr/bin/pkd
41
@@ -7,7 +7,7 @@ TITLE=" ~ Automate Download Helper ~ "
42
 
43
 multiDownlist=$(mktemp -uq)
44
 
45
-trap 'sudo rm -f ${multiDownlist} /tmp/total.tmp >/dev/null 2>&1' EXIT INT TERM HUP QUIT  >/dev/null 2>&1
46
+trap 'sudo rm -f ${multiDownlist} /tmp/total.tmp >/dev/null 2>&1' EXIT TERM QUIT  >/dev/null 2>&1
47
 
48
 cat <<-EOF > ${multiDownlist}
49
 ##  PLEASE ENTER YOUR DESIRED SOURCES AND PACKAGES BELOW :  ( No source assumes pkg is in package database or AUR )
50
@@ -63,7 +63,7 @@ color3="yellow"    # Package Description
51
 EOF
52
 
53
 
54
-name="$(echo "$USER")"
55
+name="$(echo "${USER}")"
56
 
57
 
58
 [ -n $(echo $color1) ] || [ ! $color1 ] && color1=blue
59
@@ -96,11 +96,11 @@ scrstart()    { clear ; echo -e "\n\n" ; green "   Downloading Packages : " ; ec
60
   red "\n [-] ERROR: Could Not Find '"$1"'\n\n" ; }
61
 
62
 
63
-npminstall()  { sudo -u "$name" npm install -g "$1" "$npmd"/"$pkg" >/dev/null 2>&1 || 
64
+npminstall()  { sudo npm install -g "$1" >/dev/null 2>&1 && return 0 || 
65
   ! sudo pacman -Qq npm >/dev/null 2>&1 && err "NPM is not installed. Please install it and try again."  ||
66
   red "\n [-] ERROR: Could Not Find '"$1"' in NPM database.\n\n" ; }
67
 
68
-snpinstall()  { sudo -u "$name" snap install "$1" >/dev/null 2>&1 || 
69
+snpinstall()  { sudo snap install "$1" >/dev/null 2>&1 && return 0 || 
70
   ! sudo pacman -Qq snapd >/dev/null 2>&1 && err "Snapd is not installed. Please install it and try again." ||
71
   red "\n [-] ERROR: Could Not Find '"$1"'in Snap database.\n\n" ; }
72
 
73
@@ -109,31 +109,31 @@ pkginstall()  { ${helper} -S --needed --noconfirm "$1" >/dev/null 2>&1 && return
74
   red "\n [-] Errors occurred during install of ${1}. Most likely due to conflicting packages.\n\n" ||
75
   red "\n [-] ERROR: '"$1"' could not be found in package database.\n\n" ; }
76
 
77
-pipinstall()  { sudo -u "$name" python3 -m pip install "$1" "$pipd"/"$pkg" >/dev/null 2>&1 || 
78
+pipinstall()  { sudo python3 -m pip install "$1" >/dev/null 2>&1 && return 0 || 
79
   ! sudo pacman -Qq python-pip >/dev/null 2>&1 && err "Python-pip is not installed. Please install it and try again." ||
80
   red "\n [-] ERROR: Could Not Find '"$1"' in Python database.\n\n" ; }
81
 
82
-flatinstall()  { sudo -u "$name" flatpak install -y "$1" >/dev/null 2>&1 ||
83
+flatinstall()  { sudo flatpak install -y "$1" >/dev/null 2>&1 && return 0 ||
84
   ! sudo pacman -Qq flatpak >/dev/null 2>&1 && err "Flatpak is not installed. Please install it and try again." ||
85
   red "\n [-] ERROR: Could Not Find '"$1"' in Flatpak database.\n\n" ; }
86
 
87
-labclone()    { git clone https://gitlab.com/"$1".git \
88
+labclone()    { git clone https://gitlab.com/"$1".git >/dev/null 2>&1 && return 0 ||
89
   ! sudo pacman -Qq git >/dev/null 2>&1 && err "Git is not installed. Please install it and try again." ||
90
-   >/dev/null 2>&1 || red "\n [-] ERROR: Could Not Find '"$1"' Git repo.\n\n" ; }
91
+   red "\n [-] ERROR: Could Not Find '"$1"' Git repo.\n\n" ; }
92
 
93
-mylabclone()  { git clone https://gitlab.com/"$labname"/"$(basename $1)".git \
94
+mylabclone()  { git clone https://gitlab.com/"$labname"/"$(basename $1)".git >/dev/null 2>&1 && return 0 ||
95
   ! sudo pacman -Qq git >/dev/null 2>&1 && err "Git is not installed. Please install it and try again." ||
96
-   >/dev/null 2>&1 || red "\n [-] ERROR: Could Not Find '"$1"' Git repo.\n\n" ; }
97
+   red "\n [-] ERROR: Could Not Find '"$1"' on Gitlab.\n\n" ; }
98
 
99
-myhubclone()  { git clone https://github.com/"$hubname"/"$(basename $1)".git \
100
+myhubclone()  { git clone https://github.com/"$hubname"/"$(basename $1)".git >/dev/null 2>&1 && return 0 ||
101
   ! sudo pacman -Qq git >/dev/null 2>&1 && err "Git is not installed. Please install it and try again." ||
102
-   >/dev/null 2>&1 || red "\n [-] ERROR: Could Not Find '"$1"' Git repo.\n\n" ; }
103
+   red "\n [-] ERROR: Could Not Find '"$1"' on Github.\n\n" ; }
104
 
105
-hubclone()    { git clone https://github.com/"$1".git \
106
+hubclone()    { git clone https://github.com/"$1".git >/dev/null 2>&1 && return 0 ||
107
   ! sudo pacman -Qq git >/dev/null 2>&1 && err "Git is not installed. Please install it and try again." ||
108
-   >/dev/null 2>&1 || red "\n [-] ERROR: Could Not Find '"$1"' Git repo.\n\n" ; }
109
+   red "\n [-] ERROR: Could Not Find '"$1"' Git repo.\n\n" ; }
110
 
111
-lnOrTorrent() { aria2c "${1}" >/dev/null 2>&1 || 
112
+lnOrTorrent() { aria2c "${1}" >/dev/null 2>&1 && return 0 || 
113
   ! sudo pacman -Qq aria2 >/dev/null 2>&1 && err "NPM is not installed. Please install it and try again." ||
114
   red "\n [-] ERROR: "$1", Could not be download.\n\n" ; }
115
 
116
@@ -296,8 +296,6 @@ esac
117
 [ -z $packages ] && err "No packages specified ..."
118
 
119
 
120
-[ -f /tmp/total.tmp ] && rm /tmp/total.tmp
121
-
122
 for x in  "${packages[@]}" ; do  
123
 
124
   echo $x >> /tmp/total.tmp 
125
@@ -322,6 +320,9 @@ while IFS=, read -r src pkg desc viewName ; do
126
 
127
   [[ ${src} == 'W' ]] && [[ -z ${desc} ]] && desc="Downloading Link..."
128
 
129
+  [[ ${src} == 'MH' ]] && [[ -z ${desc} ]] && desc="Cloning Repo from ${hubname}'s Github ..."
130
+  
131
+  [[ ${src} == 'ML' ]] && [[ -z ${desc} ]] && desc="Cloning Repo from ${hubname}'s Gitlab..."
132
 
133
   [[ ${src} == 'W' ]] && echo ${pkg} | grep -q "\.torrent$" || echo ${pkg} | grep -q "^magnet:\?.*" && 
134
     viewName="Downloading Torrent File..." && desc=""