Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
roothider committed Jan 6, 2025
2 parents aac1ef9 + a551c24 commit 88d8863
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
7 changes: 6 additions & 1 deletion bin/install-sdk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@

set -e

urls=$(curl -s https://api.github.com/repos/theos/sdks/releases/latest | grep download_url | sed 's/.*: "\(.*\)"/\1/')
SDK_FETCH_URL="https://api.github.com/repos/theos/sdks/releases/latest"
if ! [[ -z "$GITHUB_TOKEN" ]]; then
urls=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" $SDK_FETCH_URL | grep download_url | sed 's/.*: "\(.*\)"/\1/')
else
urls=$(curl -s $SDK_FETCH_URL | grep download_url | sed 's/.*: "\(.*\)"/\1/')
fi
if [[ -z "$urls" ]]; then
echo "ERROR: api.github.com request failed?!" >&2
exit 1
Expand Down
13 changes: 7 additions & 6 deletions bin/install-theos
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ if [[ $CSHELL == sh || $CSHELL == bash || $CSHELL == dash ]]; then
fi
elif [[ $CSHELL == zsh ]]; then
# Zsh prioritizes zshenv > zprofile > zshrc
if [[ -f $HOME/.zshenv ]]; then
SHELL_ENV="$HOME/.zshenv"
elif [[ -f $HOME/.zprofile ]]; then
SHELL_ENV="$HOME/.zprofile"
zdot="${ZDOTDIR:-$HOME}"
if [[ -f $zdot/.zshenv ]]; then
SHELL_ENV="$zdot/.zshenv"
elif [[ -f $zdot/.zprofile ]]; then
SHELL_ENV="$zdot/.zprofile"
else
SHELL_ENV="$HOME/.zshrc"
SHELL_ENV="$zdot/.zshrc"
fi
# TODO
# elif [[ $CSHELL == csh ]]; then
Expand Down Expand Up @@ -354,7 +355,7 @@ linux() {
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
;;
redhat)
sudo dnf group install -y "C Development Tools and Libraries" --refresh \
sudo dnf group install -y "c-development" --refresh \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
sudo dnf install -y fakeroot lzma libbsd rsync curl perl zip git libxml2 \
Expand Down
2 changes: 1 addition & 1 deletion vendor/templates

0 comments on commit 88d8863

Please sign in to comment.