-
Senior Member
registered user
Small script to automate the repackaging step of knoppification
There are quite a few Knoppix packages involved, with a small minority installable from repos.
Here is a small script, called knoppify_deb_1.sh, for faster and safer creation of packages. It creates a list of all installed packages in subdirectory knxdata, using dpkg-query, and uses that list.
It creates the full list of knoppix-branded packages that may be created this way in directory deb - with no guarantee of usability 
I try with arch=all first - to see how it works out.
Code:
#!/bin/bash
# 20160327
# Usage
# sudo ./knoppify_deb_1.sh create package-list-1
# sudo ./knoppify_deb_1.sh create package-list-2
# sudo ./knoppify_deb_1.sh repackage knoppix-debs
#
function repackage_knoppix() {
command=$1; shift;
operand=$1; shift;
[ -d knxdata ] || mkdir knxdata ;
case "${command} ${operand}" in
"create package-list-1")
dpkg-query -W --showformat='${Section} ${Package}\n' | sort -n > knxdata/knx761_DVD_sect1.txt ;
;;
"create package-list-2")
dpkg-query -W --showformat='${Section} ${Package} ${Installed-Size}\n' | sort -n > knxdata/knx761_DVD_sect2.txt ;
;;
"repackage knoppix-debs")
[ -d deb ] || mkdir deb ;
cd deb ;
dpkg-repack -arch=all `cat ../knxdata/knx761_DVD_sect1.txt | grep ^knoppix | cut -d' ' -f2` ;
cd .. ;
;;
*) echo oops - no executable command
;;
esac
}
repackage_knoppix $1 $2 ;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot
$60.00

External SSD 1TB 2TB 4TB Portable Hard Drive USB 3.0 Type-C High Speed PC Mac
$19.99

Dell Latitude 14" Laptop Computer Intel i5 Up To 32GB RAM 1TB SSD Windows 11 Pro
$545.25

Seagate Desktop 1TB/1000GB SATA 3.5" HDD Hard Drive
$29.99

Acer Predator Helios Neo 16S AI 16" i9 275HX 2S RTX 5070 Ti 32GB 1TB SSD Refurb
$1746.47

SAMSUNG T7 Portable SSD 1TB Indigo Blue USB 3.2 Gen2 External MU-PC1T0H/AM
$159.99

1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive
$86.95

Netac 2TB 1TB 500GB Internal SSD M.2 NVMe PCIe3.0 Solid State Drive lot
$129.99

Samsung 1TB SSD BM91H 1TB (MZ-VMA1T00) Internal SSD M.2
$135.00

AYANEO AM01 AMD Ryzen 7 5800U Gaming Mini PC Retro Classic DP DDR4 32GB 1Tb
$400.00