Skip to content

Commit

Permalink
Fix fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
rbamos committed Jul 11, 2024
1 parent 79b6668 commit 74e2ba3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
MIN_OS_VERSION="12.4.0"
kernel_name=$(uname -s)

if [[ "$kernel_name" != 'Darwin' ]] && [[ "$kernel_name" != 'Linux' ]]; then
red_echo "This script is only supported on MacOS and Linux."
exit
fi

# If run from a curl | bash, curl | bash utils, otherwise look locally
# If the utils.sh file is not present, download & run it
if [[ ! -e "utils.sh" ]]; then
eval "$(curl -Ls 'https://github.com/panorama-ed/leapp-setup/blob/main/utils.sh')"
eval "$(curl -Ls 'https://raw.githubusercontent.com/panorama-ed/leapp-setup/main/utils.sh')"
else
. ./utils.sh
fi

if [[ "$kernel_name" != 'Darwin' ]] && [[ "$kernel_name" != 'Linux' ]]; then
red_echo "This script is only supported on MacOS and Linux."
exit
fi

if [[ "$kernel_name" == 'Darwin' ]]; then
CURRENT_OS_VERSION=$(sw_vers -productVersion)
# use version sorting to check if the current version is less than $MIN_OS_VERSION
Expand Down Expand Up @@ -137,8 +137,9 @@ while true; do
esac
done

# If the config.sh file is not present, download & run it
if [[ ! -e "config.sh" ]]; then
eval "$(curl -Ls 'https://github.com/panorama-ed/leapp-setup/blob/main/config.sh')"
eval "$(curl -Ls 'https://raw.githubusercontent.com/panorama-ed/leapp-setup/main/config.sh')"
else
. ./config.sh
fi

0 comments on commit 74e2ba3

Please sign in to comment.