diff options
author | Vitaly Zdanevich <zdanevich.vitaly@ya.ru> | 2024-04-15 17:07:33 +0400 |
---|---|---|
committer | Vitaly Zdanevich <zdanevich.vitaly@ya.ru> | 2024-04-15 17:07:33 +0400 |
commit | 2b3560eb47f1a78a2c3480129ce104925796391e (patch) | |
tree | a7aa8954ead8f4f1bad7499f022d899be5a8b9e6 /app-shells | |
parent | games-fps/the-dark-mod-bin: new package, native game (diff) | |
download | guru-2b3560eb47f1a78a2c3480129ce104925796391e.tar.gz guru-2b3560eb47f1a78a2c3480129ce104925796391e.tar.bz2 guru-2b3560eb47f1a78a2c3480129ce104925796391e.zip |
app-shells/wttr-in: curl wrapper, maybe will be extended in the future
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
Diffstat (limited to 'app-shells')
-rw-r--r-- | app-shells/wttr-in/metadata.xml | 8 | ||||
-rw-r--r-- | app-shells/wttr-in/wttr-in-9999.ebuild | 30 |
2 files changed, 38 insertions, 0 deletions
diff --git a/app-shells/wttr-in/metadata.xml b/app-shells/wttr-in/metadata.xml new file mode 100644 index 000000000..812e586b9 --- /dev/null +++ b/app-shells/wttr-in/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <name>Vitaly Zdanevich</name> + <email>zdanevich.vitaly@ya.ru</email> + </maintainer> +</pkgmetadata> diff --git a/app-shells/wttr-in/wttr-in-9999.ebuild b/app-shells/wttr-in/wttr-in-9999.ebuild new file mode 100644 index 000000000..e1f8bc8f4 --- /dev/null +++ b/app-shells/wttr-in/wttr-in-9999.ebuild @@ -0,0 +1,30 @@ +# Copyright 2024 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Weather in terminal - just a curl to wttr.in" +HOMEPAGE="https://wttr.in/" +LICENSE="GPL-3" + +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="net-misc/curl" + +S="$WORKDIR" + +src_install() { + dodir /usr/bin/ + echo "curl wttr.in/\$@" > "$ED/usr/bin/weather" + fperms +x "/usr/bin/weather" + # TODO add options from https://github.com/chubin/wttr.in#one-line-output + # TODO wrap in a script to add support of '-h'? + # TODO add `curl v2.wttr.in/batumi` +} + +pkg_postinst() { + einfo "Run weather command" + einfo "You can specify the city with 'weather batumi'" + einfo "For help: 'weather :help'" +} |