File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ # longest_word () {
2
+ # declare -a pkgs=$@
3
+ # declare -i longest=0
4
+ # for pkg in ${pkgs[@]}
5
+ # do
6
+ # if [ ${#pkg} -gt $longest ]; then
7
+ # longest=${#pkg}
8
+ # fi
9
+ # done
10
+
11
+ # echo $longest
12
+ # }
13
+
14
+ # whitespaces() {
15
+ # i=0
16
+ # space=" "
17
+ # qnt_ws=$(($1 - $2))
18
+
19
+ # while [[ "$i" != $qnt_ws ]]
20
+ # do
21
+ # space+=" "
22
+ # ((i+=1))
23
+ # done
24
+ # echo "$space"
25
+
26
+ # }
27
+
28
+ # show_desc () {
29
+ # ./xbps-src show "$1" | rg short_desc | awk '{$1=""; print $0}'
30
+ # }
31
+
32
+ # if_instaled () {
33
+ # [[ "$1" != '' ]] && flag="[$colorgray*$colorreset]" || flag="[-]"
34
+ # echo -n "$flag"
35
+ # }
36
+
37
+ # lsgrep_binpkgs () {
38
+ # [ -d "$VOID_BINPKGS" ] && ls $VOID_BINPKGS/* | rg $1 || echo ''
39
+ # }
40
+
41
+ # check_binpkgs () {
42
+ # check=$(lsgrep_binpkgs "$1")
43
+ # resul=$(if_instaled $check)
44
+ # echo -n "$resul"
45
+ # }
46
+
47
+ # search_result () {
48
+ # declare -a res=()
49
+
50
+ # pkgs=$(ls $VOID_SRCPKGS | rg $1)
51
+ # lword=$(longest_word ${pkgs[@]})
52
+
53
+ # for pkg in ${pkgs[@]}
54
+ # do
55
+ # wsnum=$(whitespaces $lword ${#pkg})
56
+ # desc=$(show_desc $pkg)
57
+ # inststr=$(check_binpkgs $pkg)
58
+ # res+=("$inststr $pkg$wsnum-$desc")
59
+ # done
60
+
61
+ # printf '%s\n' "${res[@]}"
62
+ # }
63
+
You can’t perform that action at this time.
0 commit comments