Merge pull request #125 from gh0stshell/master

Updated depends, updated bmap check
This commit is contained in:
evilsocket
2019-10-04 10:40:10 +02:00
committed by GitHub
2 changed files with 16 additions and 10 deletions

View File

@ -5,7 +5,7 @@
set -eu
REQUIREMENTS=( wget gunzip git dd e2fsck resize2fs parted losetup qemu-system-x86_64 )
DEBREQUIREMENTS=( wget gzip git parted qemu-system-x86 qemu-user-static bmap-tools )
DEBREQUIREMENTS=( wget gzip git parted qemu-system-x86 qemu-user-static )
REPO_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
TMP_DIR="${REPO_DIR}/tmp"
MNT_DIR="${TMP_DIR}/mnt"
@ -93,15 +93,13 @@ function provide_raspbian() {
function setup_raspbian(){
# Detect the ability to create sparse files
if [ "${OPT_SPARSE}" -eq 0 ];
then
which bmaptool >/dev/null 2>&1
if [ $? -eq 0 ];
then
if [ "${OPT_SPARSE}" -eq 0 ]; then
if [ which bmaptool -eq 0 ]; then
echo "[!] bmaptool not available, not creating a sparse image"
else
echo "[+] Defaulting to sparse image generation as bmaptool is available"
OPT_SPARSE=1
else
echo "[!] bmaptool not available, not creating a sparse image"
fi
fi