Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The below bash script was written in ~10 sec, but packaging it would take me hours of skimming through big walls of text so I ask my self if there is an easy way out there that I don't know about.

#!/usr/bin/env bash

echo "Hello World"


Here a complete little how to, following stef's linked answer:

  • First we need to install these packages: sudo apt-get install dh-make devscripts

  • Copy the above script into an editor and save it as hello file

chmod u+x hello
mkdir hello-0.1
cp hello hello-0.1/

cd hello-0.1/
dh_make -s --indep --createorig
grep -v makefile debian/rules > debian/rules.new
mv debian/rules.new debian/rules
echo hello usr/bin > debian/install
echo "1.0" > debian/source/format
rm debian/*.ex
debuild -us -uc
cd ..
sudo dpkg -i hello_0.1-1_all.deb

Now entering hello into the Terminal prints 'Hello World'.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You could check this answer: create a .deb Package from scripts or binaries The answer provides a quick guide in 8 simple steps.

As an extra you could check a similar procedure for Python scripts: Create deb package for Python source and upload it to ppa at Launchpad

share|improve this answer
    
Finally a quick & dirty way to create deb's for a simple shell script. Thanks –  Paradiesstaub Apr 9 '13 at 23:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.