aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Lundgaard <[email protected]>2016-05-23 12:56:50 -0500
committerNicholas Lundgaard <[email protected]>2016-05-23 12:56:50 -0500
commit193f2abc57d4e625bc9a22ff2d9a78838b476c84 (patch)
treecf575420c802b836dbfc6ab3b2359152356bac86
parent88242256023967b357de56289d1dbaa034973a8a (diff)
downloadkerl-193f2abc57d4e625bc9a22ff2d9a78838b476c84.tar.gz
kerl-193f2abc57d4e625bc9a22ff2d9a78838b476c84.tar.bz2
kerl-193f2abc57d4e625bc9a22ff2d9a78838b476c84.zip
make kerl use 'curl -o $filename ...' when downloading files
Instead of piping output to a file, use curl's '-o' option. This change is intended to work around a problem I encountered where I had `-w "\n"` in my `~/.curlrc` file, which caused these commands to produce output that failed the md5 checks.
-rwxr-xr-xkerl6
1 files changed, 3 insertions, 3 deletions
diff --git a/kerl b/kerl
index 0fb8c30..37e54dc 100755
--- a/kerl
+++ b/kerl
@@ -206,7 +206,7 @@ update_checksum_file()
return 0
else
echo "Getting the checksum file from erlang.org..."
- curl -L $ERLANG_DOWNLOAD_URL/MD5 > "$KERL_DOWNLOAD_DIR"/MD5 || exit 1
+ curl -L -o "$KERL_DOWNLOAD_DIR/MD5" "$ERLANG_DOWNLOAD_URL/MD5" || exit 1
fi
}
@@ -985,14 +985,14 @@ github_download()
{
if [ ! -f "$KERL_DOWNLOAD_DIR/$1" ]; then
echo "Downloading $1 to $KERL_DOWNLOAD_DIR"
- curl -L "$OTP_GITHUB_URL/archive/$1" > "$KERL_DOWNLOAD_DIR/$1"
+ curl -L -o "$KERL_DOWNLOAD_DIR/$1" "$OTP_GITHUB_URL/archive/$1"
fi
}
tarball_download()
{
if [ ! -f "$KERL_DOWNLOAD_DIR/$1" ]; then
- curl -L "$ERLANG_DOWNLOAD_URL/$1" > "$KERL_DOWNLOAD_DIR/$1"
+ curl -L -o "$KERL_DOWNLOAD_DIR/$1" "$ERLANG_DOWNLOAD_URL/$1"
update_checksum_file
fi
ensure_checksum_file