From 9d34cad21309daede208dd6a2622b2885742604a Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 11 Sep 2022 17:52:11 +0200 Subject: [PATCH] Download and extract all dependencies. --- nixdeb.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nixdeb.sh b/nixdeb.sh index 323355c..b5a3494 100755 --- a/nixdeb.sh +++ b/nixdeb.sh @@ -9,13 +9,16 @@ ROOT_DIR=./nixdeb/root mkdir -p $ADMIN_DIR mkdir -p $ROOT_DIR -filename=$(apt-get download --print-uris $1 | awk '{print $2}') +for p in $(apt-rdepends $1 2> /dev/null | grep -v "^ ") +do + +filename=$(apt-get download --print-uris $p | awk '{print $2}') INSTALL_DIR_PKG=$INSTALL_DIR/$filename mkdir -p $INSTALL_DIR_PKG -apt-get download $1 -dpkg --unpack --admindir=$ADMIN_DIR --instdir=$INSTALL_DIR_PKG $filename +apt-get download $p +dpkg --unpack --force-all --admindir=$ADMIN_DIR --instdir=$INSTALL_DIR_PKG $filename links () { dir=$1 @@ -37,3 +40,5 @@ links () { } links $INSTALL_DIR_PKG + +done -- 2.49.0