thorium-mirror/infra/fetch_api_keys.sh

37 lines
961 B
Bash
Raw Normal View History

2023-02-22 06:42:43 -03:00
#!/bin/bash
2023-06-28 01:24:17 -04:00
# Copyright (c) 2023 Alex313031.
2023-02-22 06:42:43 -03:00
# Simply uses wget to fetch Thorium API Keys.
# This is to keep them out of the main repo, in the case Google
# wants to crack down on distributing them.
YEL='\033[1;33m' # Yellow
CYA='\033[1;96m' # Cyan
RED='\033[1;31m' # Red
GRE='\033[1;32m' # Green
c0='\033[0m' # Reset Text
bold='\033[1m' # Bold Text
underline='\033[4m' # Underline Text
# Error handling
yell() { echo "$0: $*" >&2; }
die() { yell "$*"; exit 111; }
try() { "$@" || die "${RED}Failed $*"; }
printf "\n" &&
printf "${YEL}Downloading API_KEYS.txt here...${c0}\n" &&
printf "\n" &&
rm -f ./API_KEYS.txt &&
2023-06-28 01:24:17 -04:00
rm -f ../API_KEYS.txt &&
2023-02-22 06:42:43 -03:00
2023-06-28 01:24:17 -04:00
wget --directory-prefix=../ https://raw.githubusercontent.com/cr-bucket/thor-bucket/main/API_KEYS.txt &&
2023-02-22 06:42:43 -03:00
printf "${GRE}Done.\n" &&
printf "${YEL}- Use the three lines therein at the atop of your args.gn\n" &&
printf "${YEL} (Replacing the ones already in there that have blank values)\n" &&
tput sgr0
exit 0