From a6643047caea935e1915b016fb67a1c3d15658ea Mon Sep 17 00:00:00 2001 From: Joe Hillenbrand Date: Fri, 17 Sep 2021 00:11:03 -0700 Subject: [PATCH] add version arg --- Makefile | 4 +++- PKGBUILD | 4 ++-- README.md | 5 +++-- VERSION | 2 +- sysz | 11 +++++++++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index baa7fe6..a26b205 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ .PHONY: all install clean -all: clean README.md +all: clean README.md VERSION PKGBUILD + sed -i -e "s/^SYSZ_VERSION=.*/SYSZ_VERSION=`cat VERSION`/" sysz + sed -i -e "s/^pkgver=.*/pkgver=`cat VERSION`/" PKGBUILD clean: rm -f README.md diff --git a/PKGBUILD b/PKGBUILD index 47cad4e..a84fc5b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,9 +1,9 @@ # Maintainer: Joe Hillenbrand (joehillen) pkgname=sysz -pkgver=1.1.0 +pkgver=1.2.0 pkgrel=0 -pkgdesc="A fzf terminal UI for systemctl" +pkgdesc="fzf terminal UI for systemctl" arch=("any") url="https://github.com/joehillen/sysz" license=("UNLICENSE") diff --git a/README.md b/README.md index 86f3964..59cf647 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A [fzf](https://github.com/junegunn/fzf) terminal UI for systemctl # Features -VERSION: 1.1.0 +VERSION: 1.2.0 - See and filter both system and user units simultaneously - Supports all units types @@ -42,7 +42,8 @@ OPTS: -u, --user Only show --user units --sys, --system Only show --system units -s STATE, --state STATE Only show units in STATE (repeatable) - -v, --verbose Print the systemctl command + -V, --verbose Print the systemctl command + -v, --version Print the version -h, --help Print this message If no options are given, both system and user units are shown. diff --git a/VERSION b/VERSION index 9084fa2..26aaba0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.2.0 diff --git a/sysz b/sysz index 941ab2f..912a10a 100755 --- a/sysz +++ b/sysz @@ -3,6 +3,8 @@ set -f # disable globbing shopt -s lastpipe +SYSZ_VERSION=1.2.0 + SYSZ_HISTORY=${SYSZ_HISTORY:-${XDG_CACHE_HOME:-~/.cache}/sysz/history} _sysz_help() { @@ -25,7 +27,8 @@ OPTS: -u, --user Only show --user units --sys, --system Only show --system units -s STATE, --state STATE Only show units in STATE (repeatable) - -v, --verbose Print the systemctl command + -V, --verbose Print the systemctl command + -v, --version Print the version -h, --help Print this message If no options are given, both system and user units are shown. @@ -231,7 +234,11 @@ while [[ -n $1 ]]; do shift shift ;; - -v | --verbose) + -v | --version) + echo "$PROG" $SYSZ_VERSION + exit 0 + ;; + -V | --verbose) VERBOSE=true shift ;;