Skip to content

Commit

Permalink
fixed version check and bump
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer authored and graysky2 committed Oct 6, 2020
1 parent 4115a1c commit 6732fb6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MIT
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 1.67
VERSION = 1.68
PN = pulseaudio-ctl

PREFIX ?= /usr
Expand All @@ -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'
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion common/pulseaudio-ctl.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6732fb6

Please sign in to comment.