From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Jason@zx2c4.com Received: from frisell.zx2c4.com (frisell.zx2c4.com [192.95.5.64]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 522977d8 for ; Wed, 16 Nov 2016 17:36:56 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 01765e34 for ; Wed, 16 Nov 2016 17:36:56 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 44278f44 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Wed, 16 Nov 2016 17:36:56 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id t79so88032132wmt.0 for ; Wed, 16 Nov 2016 09:39:47 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: "Jason A. Donenfeld" Date: Wed, 16 Nov 2016 18:39:45 +0100 Message-ID: To: Kalin KOZHUHAROV Content-Type: text/plain; charset=UTF-8 Cc: WireGuard mailing list Subject: Re: [WireGuard] RFE: A notion of VERSION (was: Debugging AllowedIps) List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , The best I could come with: > WIREGUARD_VERSION := $(shell parent_name=$$(readlink -f .. | sed -n 's:.*/[wW]ire[Gg]uard[a-z-]*-\([0-9.]\+\)$$:\1:p'); if [ -d ../.git ]; then echo "git-$$(git rev-parse --shor t HEAD)"; elif [ -n $parent_name ]; then echo "$$parent_name"; else echo "unknown"; fi) Is this reliable, or is this garbage?