From d8630570f2a2a213e8cb408bd67e99a6cd5903d8 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 3 Oct 2018 09:04:21 +0200 Subject: [PATCH] more tests around Debian pkgs installation --- miLazyCrackerFreshInstall.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/miLazyCrackerFreshInstall.sh b/miLazyCrackerFreshInstall.sh index 41f19b0..0c86797 100755 --- a/miLazyCrackerFreshInstall.sh +++ b/miLazyCrackerFreshInstall.sh @@ -8,8 +8,17 @@ fi set -x # run this from inside miLazyCracker git repo - -sudo apt-get install git libnfc-bin autoconf libnfc-dev +if [ -f "/etc/debian_version" ]; then + pkgs="" + for pkg in git libnfc-bin autoconf libnfc-dev; do + if ! dpkg -l $pkg >/dev/null 2>&1; then + pkgs="$pkgs $pkg" + fi + done + if [ "$pkgs" != "" ]; then + sudo apt-get install $pkgs + fi +fi # install MFOC [ -d mfoc ] || git clone https://github.com/nfc-tools/mfoc.git