From 6732fb6cbd9448fa79d4fe9617b590aaf5c32cdb Mon Sep 17 00:00:00 2001 From: zjeffer Date: Mon, 5 Oct 2020 23:08:06 +0200 Subject: [PATCH] fixed version check and bump --- MIT | 2 +- Makefile | 14 ++++++-------- common/pulseaudio-ctl.in | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/MIT b/MIT index a186608..37fcf3c 100644 --- a/MIT +++ b/MIT @@ -1,4 +1,4 @@ -Copyright (c) 2013-2019 graysky +Copyright (c) 2013-2020 graysky Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/Makefile b/Makefile index fd9bc56..c8c9d11 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 1.67 +VERSION = 1.68 PN = pulseaudio-ctl PREFIX ?= /usr @@ -9,20 +9,18 @@ ZSHDIR = $(PREFIX)/share/zsh/site-functions RM = rm Q = @ -all: common/$(PN) doc/$(PN).1.gz +all: common/$(PN) doc/$(PN).1 common/$(PN): common/$(PN).in $(Q)echo -e '\033[1;32mSetting version\033[0m' $(Q)sed -e 's/@VERSION@/'$(VERSION)'/' common/$(PN).in >common/$(PN) $(Q)sed -i common/$(PN) -e 's|@SKELDIR@|'$(SKELDIR)'|' -doc/$(PN).1.gz: doc/$(PN).1 - $(Q)echo -e '\033[1;32mCompressing manpage\033[0m' - gzip -9 -c doc/$(PN).1 > doc/$(PN).1.gz +doc/$(PN).1: doc/$(PN).1 clean: $(RM) -f common/$(PN) - $(RM) -f doc/$(PN).1.gz + $(RM) -f doc/$(PN).1 install-bin: $(Q)echo -e '\033[1;32mInstalling main script and config...\033[0m' @@ -33,11 +31,11 @@ install-bin: install-man: $(Q)echo -e '\033[1;32mInstalling manpage...\033[0m' - install -Dm644 doc/$(PN).1.gz "$(DESTDIR)$(MANDIR)/$(PN).1.gz" + install -Dm644 doc/$(PN).1 "$(DESTDIR)$(MANDIR)/$(PN).1" uninstall: $(RM) "$(DESTDIR)$(BINDIR)/$(PN)" - $(RM) "$(DESTDIR)$(MANDIR)/$(PN).1.gz" + $(RM) "$(DESTDIR)$(MANDIR)/$(PN).1" $(RM) -rf "$(DESTDIR)$(SKELDIR)" $(RM) "$(DESTDIR)$(ZSHDIR)/_pulseaudio-ctl" diff --git a/common/pulseaudio-ctl.in b/common/pulseaudio-ctl.in index 030055d..f3c0ce7 100644 --- a/common/pulseaudio-ctl.in +++ b/common/pulseaudio-ctl.in @@ -36,7 +36,7 @@ exit 1; } # really crude pactl version check since commands are different for different # versions of pactl. sorry users of PA <5 -PAVERSION=$(pactl --version | grep pactl | sed -e 's/^pactl //' -e 's/\([0-9.]\+\).\([0-9.]\+\)$/\1/') +PAVERSION=$(pactl --version | grep pactl | sed 's/^pactl \([0-9]*\.[0-9]\).*/\1/') if [[ ${PAVERSION%%.*} -lt 5 ]]; then # really old versions PCV=0