Skip to content

Instantly share code, notes, and snippets.

@snsinfu
Created June 6, 2019 15:15
Show Gist options
  • Save snsinfu/80d68fd68b1b0f94570645ce730d7990 to your computer and use it in GitHub Desktop.
Save snsinfu/80d68fd68b1b0f94570645ce730d7990 to your computer and use it in GitHub Desktop.
Auto-installing script for OpenDrop (https://github.com/seemoo-lab/opendrop)
#!/bin/sh -eu
#
# Put this script in your ~/bin directory!
#
: ${HOMEBREW_PREFIX:=/usr/local}
export LIBARCHIVE="${HOMEBREW_PREFIX}/opt/libarchive/lib/libarchive.dylib"
export LIBCRYPTO="${HOMEBREW_PREFIX}/opt/openssl@1.1/lib/libcrypto.dylib"
OPENDROP_GIT="git+https://github.com/seemoo-lab/opendrop.git"
OPENDROP_VENV="${HOME}/.virtualenvs/opendrop"
if [ ! -d "${OPENDROP_VENV}" ]; then
mkdir -p "${OPENDROP_VENV}"
python3 -m venv "${OPENDROP_VENV}"
"${OPENDROP_VENV}/bin/python" -m pip install "${OPENDROP_GIT}"
fi
exec "${OPENDROP_VENV}/bin/opendrop" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment