I wrote a sh program with many options and lot of cool stuff and I will to learn how to package it. So ppl could downlaod it and use it just like ls cp ..
So if I have BUX.sh
ppl could type
BUX -r-r
on the command line and it just work
or I could have
BUM man
Also I like to offer them to update as I find any issue with the code
What OS did you write the script for? If it's Linux, is it specific to a certain distribution / do you have a preference?
With Linux (can't say anything about other Unices) you have 2 options:
find a maintainer that takes care of the packaging
maintain the package yourself
If you go with 2. (which is usually the case with new software), learn the packaging format and common layout for your chosen distribution. Then, submit it to said distribution for a review. If the packaging team decides that your package is stable enough, it might get included in the next release.
If you want to stay independent, you'll have to do that yourself. However, that will probably also mean no automatic updates, since setting up your own repository isn't really trivial.
You need to be more specific about what you mean by "publish". Is this for distribution over the internet to anyone interested in running the code?Is it for distribution around a LAN or WAN maybe at work or a college? If so are there security restrictions in place?If you could be more specific about who you are publishing this for it would be easier to answer your question.