diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..3374bfa --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Github repository +REPO="NetworkConfiguration/dhcpcd" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$VERSION" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 68eb49f..1c8ec9e 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,6 @@ name: dhcpcd description: A DHCP and DHCPv6 client -version: 10.0.6 -revision: 4 +version: 10.2.4 url: https://roy.marples.name/projects/dhcpcd license: BSD-2-Clause architecture: any diff --git a/source-files/dhcpcd.esv b/source-files/dhcpcd.esv index c7b7e5e..cd6b27f 100644 --- a/source-files/dhcpcd.esv +++ b/source-files/dhcpcd.esv @@ -2,6 +2,6 @@ name: dhcpcd description: run dhcpcd on all clients dependencies: ["udevd"] type: background -start_cmd: dhcpcd -q -B +start_cmd: dhcpcd -B -M exit_method: kill restart: true