From 09838865eefce52150554b2493038393796455fd Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 4 Dec 2017 18:47:57 +0100 Subject: [PATCH] TT#26861 Add skeletal libsipwise-base-bash package This package will serve as the home for any common basic functions we need in the Sipwise codebase. Which should avoid duplicating them all over the place. Change-Id: I52aa2dcd68dedb7ca9062c365b3338eb4dbbfef6 --- bash/sipwise-base.sh | 6 ++++++ bash/sipwise-init.sh | 3 +++ debian/.gitignore | 2 ++ debian/control | 10 ++++++++++ debian/libsipwise-base-bash.install | 1 + debian/libsipwise-base-perl.install | 2 ++ 6 files changed, 24 insertions(+) create mode 100644 bash/sipwise-base.sh create mode 100644 bash/sipwise-init.sh create mode 100644 debian/libsipwise-base-bash.install create mode 100644 debian/libsipwise-base-perl.install diff --git a/bash/sipwise-base.sh b/bash/sipwise-base.sh new file mode 100644 index 0000000..75543e7 --- /dev/null +++ b/bash/sipwise-base.sh @@ -0,0 +1,6 @@ +# +# Collection of Sipwise common bash functions. +# + +set -e +set -u diff --git a/bash/sipwise-init.sh b/bash/sipwise-init.sh new file mode 100644 index 0000000..486b313 --- /dev/null +++ b/bash/sipwise-init.sh @@ -0,0 +1,3 @@ +# +# Collection of Sipwise sysvinit bash functions. +# diff --git a/debian/.gitignore b/debian/.gitignore index 1f8bef4..78f85e3 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -4,4 +4,6 @@ /.debhelper/ /debhelper-build-stamp /files +/libsipwise-base-bash/ /libsipwise-base-perl/ +/tmp/ diff --git a/debian/control b/debian/control index 1176b45..30c177a 100644 --- a/debian/control +++ b/debian/control @@ -23,3 +23,13 @@ Description: Sipwise base perl module This package provides the Sipwise::Base Perl module which contains standard Sipwise boilerplate and tries to enforce best coding practices via code checks and default settings. + +Package: libsipwise-base-bash +Architecture: all +Description: Sipwise base bash library + This package provides several Bash library files, which contain common + shell functions to be used on Sipwise's codebase. + . + Included libraries: + - sipwise-base.sh: Common functions for any bash script. + - sipwise-init.sh: Common functions for sysvinit script. diff --git a/debian/libsipwise-base-bash.install b/debian/libsipwise-base-bash.install new file mode 100644 index 0000000..fab2b97 --- /dev/null +++ b/debian/libsipwise-base-bash.install @@ -0,0 +1 @@ +bash/* /usr/share/bash/ diff --git a/debian/libsipwise-base-perl.install b/debian/libsipwise-base-perl.install new file mode 100644 index 0000000..1cc7b75 --- /dev/null +++ b/debian/libsipwise-base-perl.install @@ -0,0 +1,2 @@ +usr/share/man +usr/share/perl5