Last active
July 24, 2024 14:12
-
-
Save 0xE0-rng/fad59e6ae9adb48fd4783cd791be7062 to your computer and use it in GitHub Desktop.
Script to install radare2 on a MacOS enviorment without root access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Download from https://github.com/radareorg/radare2/releases/tag/5.9.2 and place it in the same folder as this script | |
# 2. adjust the following paths: | |
# path for the installed files | |
INSTALL_TARGET=~/Tools/radare2-test | |
# where are your bniaries stored? Should be added to Path | |
BIN_TARGET=~/bin/ | |
# 3. run the script | |
mkdir tmp | |
cd tmp | |
tar -xf ../radare2-m1-*.pkg | |
mv Payload Payload.gz | |
gzip -cd Payload.gz| cpio -idmv | |
mkdir $BIN_TARGET | |
mkdir $INSTALL_TARGET | |
cp usr/local/bin/* $INSTALL_TARGET | |
cp -R usr/local/lib $INSTALL_TARGET | |
DYLD_LIBRARY_PATH="$INSTALL_TARGET/lib" | |
PWD=$(pwd) | |
for bin in usr/local/bin/*; do | |
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH $INSTALL_TARGET/$(basename "$bin") \"\$@\"" > $BIN_TARGET/$(basename "$bin") | |
chmod +x "$BIN_TARGET/$(basename "$bin")" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment