diff --git a/PackageManagement/debDependencies.sh b/PackageManagement/debDependencies.sh new file mode 100644 index 0000000..70e7eb7 --- /dev/null +++ b/PackageManagement/debDependencies.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +PACKAGE=$1 + +apt-get update +DEPENDENCIES=$(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances ${PACKAGE} | grep "^\w" | sort -u) + +TMP="/tmp/${PACKAGE}-$(date +%s)" +mkdir -p ${TMP} + +pushd ${TMP} +echo ${DEPENDENCIES} | xargs apt-get download +apt-get download ${PACKAGE} +popd + +tar -cvf "${PACKAGE}.tar" -C ${TMP} .