more urls and updated certificate fingerprint
[dotfiles.git] / x / .local / bin / tlmgri
1 #!/bin/bash
2 if [ "$#" -ne 1 ]
3 then
4 echo "Usage: $0 FILE"
5 exit 1
6 fi
7
8 PKGS="$(tlmgr search --global --file "/$1" 2>/dev/null | grep -Po "^.*(?=:$)")"
9 if [[ -z "$PKGS" ]]; then exit 1; fi
10 if [[ $(wc -w <<< "$PKGS") -eq 1 ]]
11 then
12 tlmgr install "$PKGS"
13 else
14 select package in $PKGS; do
15 INDEX=1
16 for p in $PKGS; do
17 if [ $((INDEX++)) -eq $REPLY ]; then
18 tlmgr install "$p"
19 fi
20 done
21 break;
22 done
23 fi