Skip to content

Commit

Permalink
fix folder handling ZMQ_TMP_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Dec 5, 2023
1 parent 5a875b8 commit cbd980c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions installation/routines/setup_jukebox_core.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Constants
ZMQ_TMP_DIR="libzmq"
ZMQ_TMP_DIR="${HOME_PATH}/libzmq"
ZMQ_PREFIX="/usr/local"
ZMQ_VERSION="4.3.5"

Expand Down Expand Up @@ -52,15 +52,15 @@ _jukebox_core_build_libzmq_with_drafts() {

LIBSODIUM_VERSION="1.0.18"
echo " Building libsodium v${LIBSODIUM_VERSION}" | tee /dev/fd/3
{ cd "${HOME_PATH}" && mkdir "${ZMQ_TMP_DIR}" && cd "${ZMQ_TMP_DIR}"; } || exit_on_error
{ mkdir "${ZMQ_TMP_DIR}" && cd "${ZMQ_TMP_DIR}"; } || exit_on_error
wget --quiet https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM_VERSION}-RELEASE/libsodium-${LIBSODIUM_VERSION}.tar.gz
tar -zxvf libsodium-${LIBSODIUM_VERSION}.tar.gz
cd libsodium-${LIBSODIUM_VERSION} || exit_on_error
./configure
make && make install

echo " Building libzmq v${ZMQ_VERSION}" | tee /dev/fd/3
cd "${HOME}/${ZMQ_TMP_DIR}" || exit_on_error
cd "${ZMQ_TMP_DIR}" || exit_on_error
wget https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}/zeromq-${ZMQ_VERSION}.tar.gz -O libzmq.tar.gz
tar -xzf libzmq.tar.gz
zeromq-${ZMQ_VERSION}/configure --prefix=${ZMQ_PREFIX} --enable-drafts
Expand All @@ -71,6 +71,8 @@ _jukebox_core_download_prebuilt_libzmq_with_drafts() {
local ZMQ_TAR_FILENAME="libzmq.tar.gz"
ARCH=$(get_architecture)

{ mkdir "${ZMQ_TMP_DIR}" && cd "${ZMQ_TMP_DIR}"; } || exit_on_error

wget https://github.com/pabera/libzmq/releases/download/v${ZMQ_VERSION}/libzmq5-${ARCH}-${ZMQ_VERSION}.tar.gz -O ${ZMQ_TAR_FILENAME}
tar -xzf ${ZMQ_TAR_FILENAME}
rm -f ${ZMQ_TAR_FILENAME}
Expand All @@ -91,8 +93,6 @@ _jukebox_core_build_and_install_pyzmq() {
# Download pre-compiled libzmq from Google Drive because RPi has trouble compiling it
echo " Download pre-compiled libzmq from Google Drive because RPi has trouble compiling it"

{ cd "${HOME_PATH}" && mkdir "${ZMQ_TMP_DIR}" && cd "${ZMQ_TMP_DIR}"; } || exit_on_error

if [[ $(uname -m) == "armv6l" ]]; then
_show_slow_hardware_message
fi
Expand Down

0 comments on commit cbd980c

Please sign in to comment.