Skip to content

Commit

Permalink
Print the MD5 of downloaded files
Browse files Browse the repository at this point in the history
  • Loading branch information
Frugghi committed Apr 11, 2014
1 parent 815b242 commit 6a168b5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
17 changes: 11 additions & 6 deletions iSSH2-libssh2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ set -e

mkdir -p "${LIBSSHDIR}"

if [ ! -f "${LIBSSHDIR}/libssh2-${LIBSSH_VERSION}.tar.gz" ];
LIBSSH_TAR="libssh2-${LIBSSH_VERSION}.tar.gz"

if [ ! -f "${LIBSSHDIR}/${LIBSSH_TAR}" ];
then
echo "Downloading libssh2-${LIBSSH_VERSION}.tar.gz"
curl --progress-bar "http://www.libssh2.org/download/libssh2-${LIBSSH_VERSION}.tar.gz" > "${LIBSSHDIR}/libssh2-${LIBSSH_VERSION}.tar.gz"
echo "Downloading ${LIBSSH_TAR}"
curl --progress-bar "http://www.libssh2.org/download/${LIBSSH_TAR}" > "${LIBSSHDIR}/${LIBSSH_TAR}"
else
echo "libssh2-${LIBSSH_VERSION}.tar.gz already exists"
echo "${LIBSSH_TAR} already exists"
fi

LIBSSH_MD5=`md5 -q ${LIBSSHDIR}/${LIBSSH_TAR}`
echo "MD5: ${LIBSSH_MD5}"

mkdir -p "${LIBSSHDIR}/src/"

set +e
echo "Extracting libssh2-${LIBSSH_VERSION}.tar.gz"
tar -zxkf "${LIBSSHDIR}/libssh2-${LIBSSH_VERSION}.tar.gz" -C "${LIBSSHDIR}/src" --strip-components 1 2>&-
echo "Extracting ${LIBSSH_TAR}"
tar -zxkf "${LIBSSHDIR}/${LIBSSH_TAR}" -C "${LIBSSHDIR}/src" --strip-components 1 2>&-
set -e

echo "Building Libssh2 ${LIBSSH_VERSION}:"
Expand Down
17 changes: 11 additions & 6 deletions iSSH2-openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,24 @@ set -e

mkdir -p "${LIBSSLDIR}"

if [ ! -f "${LIBSSLDIR}/openssl-${LIBSSL_VERSION}.tar.gz" ];
LIBSSL_TAR="openssl-${LIBSSL_VERSION}.tar.gz"

if [ ! -f "${LIBSSLDIR}/${LIBSSL_TAR}" ];
then
echo "Downloading openssl-${LIBSSL_VERSION}.tar.gz"
curl --progress-bar "http://www.openssl.org/source/openssl-${LIBSSL_VERSION}.tar.gz" > "${LIBSSLDIR}/openssl-${LIBSSL_VERSION}.tar.gz"
echo "Downloading ${LIBSSL_TAR}"
curl --progress-bar "http://www.openssl.org/source/${LIBSSL_TAR}" > "${LIBSSLDIR}/${LIBSSL_TAR}"
else
echo "openssl-${LIBSSL_VERSION}.tar.gz already exists"
echo "${LIBSSL_TAR} already exists"
fi

LIBSSL_MD5=`md5 -q ${LIBSSLDIR}/${LIBSSL_TAR}`
echo "MD5: ${LIBSSL_MD5}"

mkdir -p "${LIBSSLDIR}/src/"

set +e
echo "Extracting openssl-${LIBSSL_VERSION}.tar.gz"
tar -zxkf "${LIBSSLDIR}/openssl-${LIBSSL_VERSION}.tar.gz" -C "${LIBSSLDIR}/src" --strip-components 1 2>&-
echo "Extracting ${LIBSSL_TAR}"
tar -zxkf "${LIBSSLDIR}/${LIBSSL_TAR}" -C "${LIBSSLDIR}/src" --strip-components 1 2>&-
set -e

echo "Building OpenSSL ${LIBSSL_VERSION}:"
Expand Down

0 comments on commit 6a168b5

Please sign in to comment.