From dd1c5d04c85c4ec110ca65ce2063a2317c06e7ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Venri=C3=A8s?= Date: Sun, 5 Nov 2017 17:17:46 +0100 Subject: [PATCH] misc: Fix transition for new submodule name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Venriès --- Makefile | 4 +++- mons | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index f3208e4..b9ce84d 100644 --- a/Makefile +++ b/Makefile @@ -18,12 +18,14 @@ install: exit 1; \ fi mkdir -p $(MANDIR) - cp $(PKGNAME).1.gz $(MANDIR)/$(PKGNAME).1.gz mkdir -p $(LICENSEDIR) mkdir -p $(LIBDIR) mkdir -p $(BINDIR) + chmod 644 $(PKGNAME).1.gz + chmod 644 LICENSE chmod 644 $(LIB) chmod 755 mons + cp $(PKGNAME).1.gz $(MANDIR)/$(PKGNAME).1.gz cp LICENSE $(LICENSEDIR)/LICENSE cp $(LIB) $(LIBDIR)/liblist.sh cp mons $(BINDIR)/mons diff --git a/mons b/mons index f692371..8ccd827 100755 --- a/mons +++ b/mons @@ -20,13 +20,6 @@ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -if [ ! -f "/usr/lib/libshlist/liblist.sh" ]; then - echo '/usr/lib/libshlist/liblist.sh: library not found.' - exit 1 -fi - -. /usr/lib/libshlist/liblist.sh - usage() { echo 'Usage: mons [OPTION]... @@ -71,7 +64,7 @@ Daemon mode: } version() { - echo 'Mons 0.8 + echo 'Mons 0.8.1 Copyright (C) 2017 Thomas "Ventto" Venries. License MIT: . @@ -82,6 +75,13 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ' } +# Helps to generate manpage with help2man before installing the library +[ "$1" = '-h' ] && { usage; exit; } +[ "$1" = '-v' ] && { version; exit; } +lib='/usr/lib/libshlist/liblist.sh' +[ ! -r "$lib" ] && { "$lib: library not found."; exit 1; } +. "${lib}" + arg_err() { usage ; exit 2 }