Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ all: $(PKG) $(SIG)
check:
shellcheck share/$(NAME)/*.sh

.PHONY: test/opt/rubies
test/opt/rubies:
./test/setup

Expand Down
9 changes: 7 additions & 2 deletions test/setup
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ function detect_system() {
)"
elif [[ -f /etc/debian_version ]]; then
system_name="debian"
system_version="$(awk -F. '{print $1"."$2}' /etc/debian_version)"
system_version="$(awk -F. '{print $1}' /etc/debian_version)"
system_arch="$( dpkg --print-architecture )"
elif [[ -f /etc/os-release ]] && [[ "$(< /etc/os-release)" == *"ID=debian"* ]]; then
system_name="debian"
system_version="$(awk -F'=' '$1=="VERSION_ID"{gsub(/"/,"");print $2}' /etc/os-release | awk -F. '{print $1"."$2}')" #'
system_version="$(awk -F'=' '$1=="VERSION_ID"{gsub(/"/,"");print $2}' /etc/os-release | awk -F. '{print $1}')" #'
system_arch="$( dpkg --print-architecture )"
elif [[ -f /etc/fedora-release ]]; then
system_name="fedora"
Expand Down Expand Up @@ -161,6 +161,11 @@ test_ruby_root="$test_ruby_engine-$test_ruby_version"
mkdir -p "$PREFIX/opt/rubies"
cd "$PREFIX/opt/rubies"

if [[ -d "$test_ruby_root" ]] && ! [[ -e "$test_ruby_archive" ]]; then
log "$test_ruby_root already extracted and cleaned up."
exit
fi

log "Downloading $test_ruby_url ..."
download "$test_ruby_url" "$test_ruby_archive" || fail "Download failed"

Expand Down