Search code examples
phpbashdebianbzip2

Build .deb Packages With PHP


I have a website that needs to build a debian package and move it into a different directory for people to download. I have been able to do this using Linux and bash files to compress and build a Packages file with dpkg. Here's the bash script

#!/bin/bash
echo Enter app name
read NAME
cd /home/stumpx/cydia/apps
dpkg -b $NAME
cp /home/stumpx/cydia/apps/$NAME.deb /home/stumpx/cydia/upload/deb/$NAME.deb
cd /home/stumpx/cydia/upload
dpkg-scanpackages -m . /dev/null >Packages
bzip2 /home/stumpx/cydia/upload/Packages -f -k

It would be nice I guess to make .bz2 files.


Solution

  • You forgot your question. But I'll answer it regardless. Use exec() to invoke your bash script.