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
22e888ed
Commit
22e888ed
authored
Apr 26, 2016
by
Dylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce size of package manager function
parent
0130c392
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
neofetch
neofetch
+10
-20
No files found.
neofetch
View file @
22e888ed
...
@@ -687,25 +687,17 @@ getpackages () {
...
@@ -687,25 +687,17 @@ getpackages () {
;;
;;
"Mac OS X"
)
"Mac OS X"
)
if
[
-
d
"/usr/local/bin"
]
;
then
[
-
d
"/usr/local/bin"
]
&&
\
local_packages
=
$(
ls
-l
/usr/local/bin/ |
grep
-v
"
\(
../Cellar/
\|
brew
\)
"
|
wc
-l
)
packages
=
$(($(
ls
-l
/usr/local/bin/ |
grep
-v
"
\(
../Cellar/
\|
brew
\)
"
|
wc
-l
)
-
1
))
packages
=
$((
local_packages
-
1
))
fi
if
type
-
p port
>/
dev/null
2
>&
1
;
then
type
-
p port
>/
dev/null
2
>&
1
&&
\
port_packages
=
$(
port installed 2>/dev/null |
wc
-l
)
packages
=
$((
packages
+
$(
port installed 2>/dev/null |
wc
-l
)
-
1
))
packages
=
$((
packages
+
port_packages
-
1
))
fi
if
type
-
p brew
>/
dev/null
2
>&
1
;
then
type
-
p brew
>/
dev/null
2
>&
1
&&
\
brew_packages
=
$(
find /usr/local/Cellar
-maxdepth
1 2>/dev/null |
wc
-l
)
packages
=
$((
packages
+
$(
find /usr/local/Cellar
-maxdepth
1 2>/dev/null |
wc
-l
)
-
1
))
packages
=
$((
packages
+
brew_packages
-
1
))
fi
if
type
-
p pkgin
>/
dev/null
2
>&
1
;
then
type
-
p pkgin
>/
dev/null
2
>&
1
&&
\
pkgsrc_packages
=
$(
pkgin list 2>/dev/null |
wc
-l
)
packages
=
$((
packages
+
$(
pkgin list 2>/dev/null |
wc
-l
)))
packages
=
$((
packages
+
pkgsrc_packages
))
fi
;;
;;
*
"BSD"
)
*
"BSD"
)
...
@@ -721,10 +713,8 @@ getpackages () {
...
@@ -721,10 +713,8 @@ getpackages () {
packages
=
$(
cygcheck
-cd
|
wc
-l
)
packages
=
$(
cygcheck
-cd
|
wc
-l
)
# Count chocolatey packages
# Count chocolatey packages
if
[
-
d
"/cygdrive/c/ProgramData/chocolatey/lib"
]
;
then
[
-
d
"/cygdrive/c/ProgramData/chocolatey/lib"
]
&&
\
choco_packages
=
$(
ls
-1
/cygdrive/c/ProgramData/chocolatey/lib |
wc
-l
)
packages
=
$((
packages+
=
$(
ls
-1
/cygdrive/c/ProgramData/chocolatey/lib |
wc
-l
)))
packages
=
$((
packages
+
choco_packages
))
fi
;;
;;
esac
esac
packages
=
${
packages
//
}
packages
=
${
packages
//
}
...
...
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