-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg-info
executable file
·66 lines (58 loc) · 1.54 KB
/
pkg-info
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
version=$(kiss s "$1" | head -n 1)
available=$(kiss s "$1" | sed '/installed/d')
# Display version of pkg
echo -e "\033[1m$1 $(cat "$version"/version):\033[0m"
# Download pkg-infos
curl -s https://repology.org/project/"$1"/information | \
# Grep some lines
grep -A 10 -i Summarie | \
# Delete unwanted lines
sed '/<\/section>/d' | \
sed '/Maintainers/d' | \
sed '/maintainer/d' | \
sed '/32-bit/d' | \
sed '/Debug/d' | \
sed '/debug/d' | \
sed '/completion/d' | \
sed '/documentation/d' | \
sed '/git/d' | \
sed '/development/d' | \
sed '/Development/d' | \
sed '/<ul>/d' | \
sed '/<\/ul>/d' | \
sed '/Summaries/d' | \
# Delete unwanted empty lines
sed '/^$/d' |
# Shuffle those lines
shuf -n 1 | \
# Delete unwanted little things
sed 's/(32 bits)//g' | \
sed 's/(mingw-w64)//g' | \
sed 's/(source)//g' | \
sed 's/'ed//g' | \
sed 's/'s//g' | \
sed 's/'//g' | \
sed 's/ls'//g' | \
sed 's/<li>\|<\/li>\|<b>(.*)<\/b>//g' | \
sed 's/^[ \t]*//;s/[ \t]*$//'
echo
# Display path of pkg
echo -e "\033[1m"kiss search":\033[0m"
echo "$available"
echo
# Display maintainer of pkg
echo -e "\033[1m"kiss-maintainer":\033[0m"
kiss-maintainer "$1" | tail -1
echo
# Display size of pkg
echo -e "\033[1m"kiss-size":\033[0m"
kiss-size "$1" | tail -1
echo
# Display revdepends of pkg
echo -e "\033[1m"kiss-revdepends":\033[0m"
kiss-revdepends "$1"
echo
# Display repo dependencies
echo -e "\033[1m"kiss-depends":\033[0m"
kiss-depends "$1"