mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
Updated install.sh to detect OS and created a function that installs properly for OS X
This commit is contained in:
parent
cbe74d8400
commit
8e1e34e66f
1 changed files with 57 additions and 31 deletions
46
install.sh
46
install.sh
|
@ -1,22 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# This is for linux ppl and it works on Ubuntu distros. Don't know about Kali.
|
# This is for linux ppl and it works on Ubuntu distros. Don't know about Kali.
|
||||||
|
function installProxmark_Linux {
|
||||||
echo "Updating your system..."
|
|
||||||
|
|
||||||
# install dependencies for Proxmark3 source code.
|
# install dependencies for Proxmark3 source code.
|
||||||
sudo apt-get install p7zip git build-essential libreadline5 libreadline-dev gcc-arm-none-eabi
|
sudo apt-get install p7zip git build-essential libreadline5 libreadline-dev gcc-arm-none-eabi
|
||||||
sudo apt-get install libusb-0.1-4 libusb-dev libqt4-dev libncurses5-dev perl pkg-config wget
|
sudo apt-get install libusb-0.1-4 libusb-dev libqt4-dev libncurses5-dev perl pkg-config wget
|
||||||
|
|
||||||
#cleaning up
|
#cleaning up
|
||||||
sudo apt-get install -f -y
|
sudo apt-get install -f -y
|
||||||
sudo apt-get autoremove -y
|
sudo apt-get autoremove -y
|
||||||
sudo apt-get autoclean -y
|
sudo apt-get autoclean -y
|
||||||
sudo apt-get clean -y
|
sudo apt-get clean -y
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
||||||
# install RDV40 - proxmark3
|
# install RDV40 - proxmark3
|
||||||
git clone https://github.com/RfidResearchGroup/proxmark3.git
|
git clone https://github.com/RfidResearchGroup/proxmark3.git
|
||||||
(
|
(
|
||||||
|
@ -29,8 +23,40 @@ git clone https://github.com/RfidResearchGroup/proxmark3.git
|
||||||
# check the Makefile for details
|
# check the Makefile for details
|
||||||
sudo make udev
|
sudo make udev
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
function installProxmark_macOS {
|
||||||
|
# Install dependencies for Proxmark3 source code.
|
||||||
|
brew tap nitsky/stm32
|
||||||
|
brew install readline libusb p7zip libusb-compat wget qt5 pkgconfig arm-none-eabi-gcc
|
||||||
|
brew link --force readline
|
||||||
|
# add moc_location in Qt5Core.pc file.
|
||||||
|
local qtDir=$(ls /usr/local/Cellar/qt/ 2>/dev/null | head -1)
|
||||||
|
local qt5Core=$(find /usr -name Qt5Core.pc 2>/dev/null)
|
||||||
|
(
|
||||||
|
export PKG_CONFIG_PATH=/usr/local/Cellar/qt/$qtDir/lib/pkgconfig/
|
||||||
|
export QT_PKG_CONFIG_QT5CORE=$qt5Core
|
||||||
|
chmod 666 $QT_PKG_CONFIG_QT5CORE
|
||||||
|
echo "moc_location=\${prefix}/bin/moc" >> $QT_PKG_CONFIG_QT5CORE
|
||||||
|
chmod 444 $QT_PKG_CONFIG_QT5CORE
|
||||||
|
)
|
||||||
|
# install RDV40 - proxmark3
|
||||||
|
git clone https://github.com/RfidResearchGroup/proxmark3.git
|
||||||
|
(
|
||||||
|
cd proxmark3 || exit 1
|
||||||
|
git reset --hard
|
||||||
|
git clean -dfx
|
||||||
|
make clean
|
||||||
|
make
|
||||||
|
)
|
||||||
|
}
|
||||||
# Where is my device?
|
# Where is my device?
|
||||||
#dmesg | tail -10
|
#dmesg | tail -10
|
||||||
|
# Detect OS and install libraries and proxmark3 client
|
||||||
echo "Done."
|
if [[ $(uname | awk '{print toupper($0)}') == "LINUX" ]]; then
|
||||||
|
echo >&2 "Linux Detected - Updating your system..."
|
||||||
|
$(installProxmark_Linux)
|
||||||
|
elif [[ $(uname | awk '{print toupper($0)}') == "DARWIN" ]]; then
|
||||||
|
echo >&2 "MAC OS X Detected - Updating your system..."
|
||||||
|
$(installProxmark_macOS) 2>/dev/null
|
||||||
|
fi
|
||||||
|
echo >&2 "Done."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue