Skip to content
Merged
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
17 changes: 1 addition & 16 deletions script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ parse_args() {
run_command() {
case $1 in
install)
local has_dub_included=0
check_tools curl
if [ ! -f "$path/install.sh" ]; then
install_dlang_installer
Expand All @@ -307,11 +306,8 @@ run_command() {
log "$2 already installed";
else
install_compiler $2
has_dub_included=$?
fi
if [ "$has_dub_included" -eq 0 ] ; then
install_dub
fi
install_dub
write_env_vars $2

if [ $(basename $SHELL) = fish ]; then
Expand Down Expand Up @@ -402,8 +398,6 @@ resolve_latest() {
}

install_compiler() {
local has_dub_included=0

# dmd-2.065, dmd-2.068.0, dmd-2.068.1-b1
if [[ $1 =~ ^dmd-2\.([0-9]{3})(\.[0-9])?(-.*)?$ ]]; then
local basename="dmd.2.${BASH_REMATCH[1]}${BASH_REMATCH[2]}${BASH_REMATCH[3]}"
Expand All @@ -423,10 +417,6 @@ install_compiler() {
local arch="zip"
fi

if [[ $ver > "2.071z" ]]; then
has_dub_included=1
fi

if [ -n "${BASH_REMATCH[3]}" ]; then # pre-release
local url="http://downloads.dlang.org/pre-releases/2.x/$ver/$basename.$arch"
else
Expand All @@ -453,9 +443,6 @@ install_compiler() {
if [ $os != linux ] && [ $os != osx ]; then
fatal "no ldc binaries available for $os"
fi
if [[ $ver > "1.0z" ]]; then
has_dub_included=1
fi

download_and_unpack "$url" "$path/$1"

Expand All @@ -481,8 +468,6 @@ install_compiler() {
else
fatal "Unknown compiler '$1'"
fi

return "$has_dub_included"
}

find_gpg() {
Expand Down