Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
bee922eb
Commit
bee922eb
authored
Jan 01, 2017
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install Date: Rewrite function
parent
673e0420
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
32 deletions
+14
-32
neofetch
neofetch
+14
-32
No files found.
neofetch
View file @
bee922eb
...
@@ -1747,43 +1747,25 @@ get_users() {
...
@@ -1747,43 +1747,25 @@ get_users() {
get_install_date() {
get_install_date() {
case "$os" in
case "$os" in
"Linux" | "iPhone OS")
"Linux" | "iPhone OS") install_file="/lost+found" ;;
install_date="$(ls -alct --full-time / | awk '
/lost
\+
found|private/
{
printf
$6
" "
$7
}
')"
"Mac OS X") install_file="/var/log/install.log" ;;
;;
"Solaris") install_file="/var/sadm/system/logs/install_log" ;;
"Windows") install_file="/cygdrive/c/Windows/explorer.exe" ;;
"Mac OS X")
"Haiku") install_file="/boot" ;;
install_date="$(ls -lUT /var/log/install.log | awk '
{
printf
$9
" "
$6
" "
$7
" "
$8
}
')"
;;
"BSD" | "MINIX")
"BSD" | "MINIX")
case "$kernel_name" in
case "$kernel_name" in
"OpenBSD"* | "Bitrig"* | "MINIX")
"FreeBSD") install_file="/etc/hostid" ;;
install_file="/"
"NetBSD" | "DragonFly"*) install_file="/etc/defaults/rc.conf" ;;
;;
*) install_file="/" ;;
"FreeBSD"*)
install_file="/etc/hostid"
;;
"NetBSD"* | "DragonFly"*)
install_file="/etc/defaults/rc.conf"
;;
esac
esac
install_date="$(ls -alctT "$install_file" | awk '
{
printf
$9
" "
$6
" "
$7
" "
$8
" "
}
')"
;;
"Windows")
install_date="$(ls -alct --full-time /cygdrive/c/Windows/explorer.exe | awk '
{
printf
$8
" "
$9
}
')"
;;
"Solaris")
install_date="$(ls -alct --full-time /var/sadm/system/logs/install_log | awk '
{
printf
$6
" "
$7
}
')"
;;
;;
esac
"Haiku")
ls_prog="$(ls --version 2>&1)"
install_date="$(ls -alctd --full-time /boot | awk '
{
printf
$6
" "
$7
}
')"
case "$ls_prog" in
;;
*"BusyBox"*) install_date="$(ls -dalcte "$install_file" | awk '
{
printf
$10
" "
$7
" "
$8
" "
$9
}
')" ;;
*"GNU coreutils"*) install_date="$(ls -dalct --full-time "$install_file" | awk '
{
printf
$6
" "
$7
}
')" ;;
*) install_date="$(ls -alctT "$install_file" | awk '
{
printf
$9
" "
$6
" "
$7
" "
$8
}
')" ;;
esac
esac
install_date="${install_date//-/ }"
install_date="${install_date//-/ }"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment