Skip to content

Commit

Permalink
Revert "Check whether DUB is provided by the release"
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Mar 1, 2017
1 parent 63e0319 commit 14a696f
Showing 1 changed file with 1 addition and 16 deletions.
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

0 comments on commit 14a696f

Please sign in to comment.