10000 GitHub - motetpaper/kbdate-sh: date-based knowledge base identifier for Ubuntu Linux
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

date-based knowledge base identifier for Ubuntu Linux

License

Notifications You must be signed in to change notification settings

motetpaper/kbdate-sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kbdate-sh

date-based knowledge base ID, implemented in bash

Using the GitHub repo for Debian package development of bash scripts

GitHub is very useful for developing bash scripts. You can use wokflows to automate repetitive tasks. Also, you can download and package source regularly to see how well installs look and feel on different Linux distributions.

Right now, we look at Debian packages, which can also be installed on Ubuntu Linux.

Let us briefly review the steps to install a bash script and its companion manpage on Linux using the Debian packaging system.

Download the source files.

Clone this repo.

git clone https://github.com/motetpaper/kbdate-sh kbdate

This is the structure of the repo when you clone it.

kbdate
├── DEBIAN
│   └── control
├── LICENSE
├── README.md
└── usr
    ├── local
    │   └── bin
    │       └── kbdate.sh
    └── share
        └── man
            └── man1
                └── kbdate.1

Prepare files.

Find the kbdate.sh, rename it, then add executable permissions.

fn=$(find kbdate -type f -name kbdate.sh)
fx=${fn%%.sh}
mv $fn $fx
sudo chmod +x $fx

Compress the kbdate man page.

gzip $(find kbdate -type f -name kbdate.1)

This is the structure of the repo at this point:

kbdate
├── DEBIAN
│   └── control
├── LICENSE
├── README.md
└── usr
    ├── local
    │   └── bin
    │       └── kbdate
    └── share
        └── man
            └── man1
                └── kbdate.1.gz

NOTE: The files change, but the directory structure stays the same.

Build the Debian package.

Check the information in the control file. Then, build the package.

dpkg -b kbdate

Install the Debian package.

You can directly install the .deb file using apt without adding a PPA repository or source item.

🖐️ Remember to use the glob syntax ./kbdate.deb when you run the installation.

sudo apt install ./kbdate.deb

kbdate should run on your system.

kbdate

The man page should also be available:

man kbdate

About

date-based knowledge base identifier for Ubuntu Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0