Score:0

Automatize using bash downloading deb files and dependencies and later extracting them to a unique folder and compress it to use in a live filesystem

ck flag

I am developing a live filesystem and need to be able to download deb files with their dependencies which I manually do using this command:

apt download $(apt-cache depends --recurse --no-recommends --no-suggests
--no-conflicts --no-breaks --no-replaces --no-enhances
--no-pre-depends ${PACKAGES} | grep "^\w")

After that, I need to extract all data.tar.gz files from the required deb packages, combine them into one unique folder (the mv command is not very useful in merging folders) which I manually do using both /usr/bin/ar x or dpkg-deb later combined with tar to extract all files from data.tar.gz from $DEB.

Is there a bash way to automatize the whole process disregarding the number of downloaded $DEB files?

terdon avatar
cn flag
Please [edit] your question and add: i) some example package names we can use to test our approaches, ii) show us the scripts you have so far and iii) tell us what your expected output would be. Alternatively, show us the directory structure and output of `ls` after downloading so we can understand what files you are working with. You will probably want something like `for deb in *deb; do ... dpkg-deb "$dev" ...; done` but the details will depend on exactly what you need to do.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.