-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.doc.sh
More file actions
executable file
·22 lines (22 loc) · 993 Bytes
/
install.doc.sh
File metadata and controls
executable file
·22 lines (22 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
currentDir=$(pwd) &&
tmpDir=$(mktemp -d -t gt-download-install-XXXXXXXXXX) && cd "$tmpDir" &&
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc" &&
wget "https://raw.githubusercontent.com/tegonal/gt/main/.gt/signing-key.public.asc.sig" &&
gpg --verify ./signing-key.public.asc.sig ./signing-key.public.asc &&
echo "public key trusted" &&
mkdir ./gpg &&
gpg --homedir ./gpg --import ./signing-key.public.asc &&
wget "https://raw.githubusercontent.com/tegonal/gt/v1.6.3/install.sh" &&
wget "https://raw.githubusercontent.com/tegonal/gt/v1.6.3/install.sh.sig" &&
gpg --homedir ./gpg --verify ./install.sh.sig ./install.sh &&
chmod +x ./install.sh &&
echo "verification successful" ||
{
printf >&2 "\033[0;31mERROR\033[0m: verification failed, don't continue !!\n"
exit 1
} && ./install.sh && result=true ||
{
echo >&2 "installation failed"
exit 1
} && false || cd "$currentDir" && rm -r "$tmpDir" && "${result:-false}"