dpkg-zstd.sh 490 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. DEBPACKAGE="$1"
  4. if [ "$1" = "" ]; then
  5. echo
  6. echo "Usage: $0 <package_name> without .deb"
  7. echo "Like zstd_repack.sh package_name"
  8. echo
  9. exit
  10. fi
  11. ar x $DEBPACKAGE.deb
  12. zstd -d < control.tar.zst | xz > control.tar.xz
  13. zstd -d < data.tar.zst | xz > data.tar.xz
  14. ar -m -c -a sdsd "$DEBPACKAGE"_repacked.deb debian-binary control.tar.xz data.tar.xz
  15. rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst