mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
neofetch: bump to 7.0.0 (#4780)
Co-authored-by: Crestwave <crestwave@users.noreply.github.com>
This commit is contained in:
@@ -4,12 +4,11 @@ your OS logo, or any ASCII file of your choice. The main purpose of Neofetch \
|
||||
is to be used in screenshots to show other users what OS/Distro you're \
|
||||
running, what Theme/Icons you're using etc"
|
||||
HOMEPAGE="https://github.com/dylanaraps/neofetch"
|
||||
COPYRIGHT="2016-2018 Dylan Araps"
|
||||
COPYRIGHT="2016-2020 Dylan Araps"
|
||||
LICENSE="MIT"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/dylanaraps/$portName/archive/$portVersion/$portVersionedName.tar.gz"
|
||||
CHECKSUM_SHA256="ece351e35286b64d362000d409b27597fcbdcf77e8e60fa0adae1f29d3c29637"
|
||||
PATCHES="neofetch-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="8c6bd217cf6d34fc1f3dcbb0e8b1137655bc13fbb21165273dbb2a7bce0d3130"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
@@ -34,5 +33,5 @@ BUILD_PREREQUIRES="
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install PREFIX=$prefix MANDIR=$manDir
|
||||
make install PREFIX="$prefix" MANDIR="$manDir"
|
||||
}
|
||||
@@ -1,168 +0,0 @@
|
||||
From 7a4f14a6d89d9a9dacd06255c36599fdb1365172 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sun, 1 Sep 2019 12:17:06 +0200
|
||||
Subject: Various fixes
|
||||
|
||||
|
||||
diff --git a/neofetch b/neofetch
|
||||
index 1a68247..6bb7118 100755
|
||||
--- a/neofetch
|
||||
+++ b/neofetch
|
||||
@@ -1021,7 +1021,7 @@ get_distro() {
|
||||
;;
|
||||
|
||||
"Haiku")
|
||||
- read -r name version _ <<< "$(uname -sv)"
|
||||
+ read -r name version _ <<< "$(uname -s)"
|
||||
distro="$name $version"
|
||||
;;
|
||||
|
||||
@@ -2660,7 +2660,7 @@ get_resolution() {
|
||||
;;
|
||||
|
||||
"Haiku")
|
||||
- resolution="$(screenmode | awk -F ' |, ' '{printf $2 "x" $3 " @ " $6 $7}')"
|
||||
+ resolution="$(screenmode | tail -1 | awk -F ' |, ' '{printf $2 "x" $3 " @ " $6 $7}')"
|
||||
|
||||
[[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
|
||||
;;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From ed5d136193a93d3270aa630eb74db7c3ec304610 Mon Sep 17 00:00:00 2001
|
||||
From: Crestwave <crestwave@users.noreply.github.com>
|
||||
Date: Sat, 28 Sep 2019 09:02:13 +0000
|
||||
Subject: [PATCH] Fix uptime
|
||||
|
||||
---
|
||||
neofetch | 103 ++++++++++++++++++++++++++-----------------------------
|
||||
1 file changed, 48 insertions(+), 55 deletions(-)
|
||||
|
||||
diff --git a/neofetch b/neofetch
|
||||
index 1a68247..ab23c79 100755
|
||||
--- a/neofetch
|
||||
+++ b/neofetch
|
||||
@@ -1213,72 +1213,65 @@ get_kernel() {
|
||||
}
|
||||
|
||||
get_uptime() {
|
||||
- # Since Haiku's uptime cannot be fetched in seconds, a case outside
|
||||
- # the usual case is needed.
|
||||
+ # Get uptime in seconds.
|
||||
case "$os" in
|
||||
- "Haiku")
|
||||
- uptime="$(uptime -u)"
|
||||
- uptime="${uptime/up }"
|
||||
+ "Linux" | "Windows" | "MINIX")
|
||||
+ if [[ -r /proc/uptime ]]; then
|
||||
+ seconds="$(< /proc/uptime)"
|
||||
+ seconds="${seconds/.*}"
|
||||
+ else
|
||||
+ boot="$(date -d"$(uptime -s)" +%s)"
|
||||
+ now="$(date +%s)"
|
||||
+ seconds="$((now - boot))"
|
||||
+ fi
|
||||
;;
|
||||
|
||||
- *)
|
||||
- # Get uptime in seconds.
|
||||
- case "$os" in
|
||||
- "Linux" | "Windows" | "MINIX")
|
||||
- if [[ -r /proc/uptime ]]; then
|
||||
- seconds="$(< /proc/uptime)"
|
||||
- seconds="${seconds/.*}"
|
||||
- else
|
||||
- boot="$(date -d"$(uptime -s)" +%s)"
|
||||
- now="$(date +%s)"
|
||||
- seconds="$((now - boot))"
|
||||
- fi
|
||||
- ;;
|
||||
+ "Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT")
|
||||
+ boot="$(sysctl -n kern.boottime)"
|
||||
+ boot="${boot/\{ sec = }"
|
||||
+ boot="${boot/,*}"
|
||||
|
||||
- "Mac OS X" | "iPhone OS" | "BSD" | "FreeMiNT")
|
||||
- boot="$(sysctl -n kern.boottime)"
|
||||
- boot="${boot/\{ sec = }"
|
||||
- boot="${boot/,*}"
|
||||
+ # Get current date in seconds.
|
||||
+ now="$(date +%s)"
|
||||
+ seconds="$((now - boot))"
|
||||
+ ;;
|
||||
|
||||
- # Get current date in seconds.
|
||||
- now="$(date +%s)"
|
||||
- seconds="$((now - boot))"
|
||||
- ;;
|
||||
+ "Solaris")
|
||||
+ seconds="$(kstat -p unix:0:system_misc:snaptime | awk '{print $2}')"
|
||||
+ seconds="${seconds/.*}"
|
||||
+ ;;
|
||||
|
||||
- "Solaris")
|
||||
- seconds="$(kstat -p unix:0:system_misc:snaptime | awk '{print $2}')"
|
||||
- seconds="${seconds/.*}"
|
||||
- ;;
|
||||
+ "AIX" | "IRIX")
|
||||
+ t="$(LC_ALL=POSIX ps -o etime= -p 1)"
|
||||
+ d="0" h="0"
|
||||
+ case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac
|
||||
+ case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac
|
||||
+ h="${h#0}" t="${t#0}"
|
||||
+ seconds="$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:}))"
|
||||
+ ;;
|
||||
|
||||
- "AIX" | "IRIX")
|
||||
- t="$(LC_ALL=POSIX ps -o etime= -p 1)"
|
||||
- d="0" h="0"
|
||||
- case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac
|
||||
- case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac
|
||||
- h="${h#0}" t="${t#0}"
|
||||
- seconds="$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:}))"
|
||||
- ;;
|
||||
- esac
|
||||
+ "Haiku")
|
||||
+ seconds=$(($(system_time) / 1000000))
|
||||
+ ;;
|
||||
+ esac
|
||||
|
||||
- days="$((seconds / 60 / 60 / 24)) days"
|
||||
- hours="$((seconds / 60 / 60 % 24)) hours"
|
||||
- mins="$((seconds / 60 % 60)) minutes"
|
||||
+ days="$((seconds / 60 / 60 / 24)) days"
|
||||
+ hours="$((seconds / 60 / 60 % 24)) hours"
|
||||
+ mins="$((seconds / 60 % 60)) minutes"
|
||||
|
||||
- # Remove plural if < 2.
|
||||
- ((${days/ *} == 1)) && days="${days/s}"
|
||||
- ((${hours/ *} == 1)) && hours="${hours/s}"
|
||||
- ((${mins/ *} == 1)) && mins="${mins/s}"
|
||||
+ # Remove plural if < 2.
|
||||
+ ((${days/ *} == 1)) && days="${days/s}"
|
||||
+ ((${hours/ *} == 1)) && hours="${hours/s}"
|
||||
+ ((${mins/ *} == 1)) && mins="${mins/s}"
|
||||
|
||||
- # Hide empty fields.
|
||||
- ((${days/ *} == 0)) && unset days
|
||||
- ((${hours/ *} == 0)) && unset hours
|
||||
- ((${mins/ *} == 0)) && unset mins
|
||||
+ # Hide empty fields.
|
||||
+ ((${days/ *} == 0)) && unset days
|
||||
+ ((${hours/ *} == 0)) && unset hours
|
||||
+ ((${mins/ *} == 0)) && unset mins
|
||||
|
||||
- uptime="${days:+$days, }${hours:+$hours, }${mins}"
|
||||
- uptime="${uptime%', '}"
|
||||
- uptime="${uptime:-${seconds} seconds}"
|
||||
- ;;
|
||||
- esac
|
||||
+ uptime="${days:+$days, }${hours:+$hours, }${mins}"
|
||||
+ uptime="${uptime%', '}"
|
||||
+ uptime="${uptime:-${seconds} seconds}"
|
||||
|
||||
# Make the output of uptime smaller.
|
||||
case "$uptime_shorthand" in
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Reference in New Issue
Block a user