Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #36 from obihann/develop
Browse files Browse the repository at this point in the history
Prepping for 1.5.2
  • Loading branch information
Jeffrey Hann committed Nov 26, 2015
2 parents 33d6994 + bf8d128 commit d3bbad2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 20 deletions.
39 changes: 25 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
# Change Log

## [1.5.1](https://github.com/obihann/archey-osx/tree/1.5.1) (2015-11-03)
[Full Changelog](https://github.com/obihann/archey-osx/compare/v1.5-pr...1.5.1)
## [Unreleased](https://github.com/obihann/archey-osx/tree/HEAD)

**Closed issues:**
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.5.1...HEAD)

- Download link in Readme.md returns 404 Not Found [\#33](https://github.com/obihann/archey-osx/issues/33)
**Merged pull requests:**

## [1.5.1-pr](https://github.com/obihann/archey-osx/tree/1.5.1-pr) (2015-11-03)
[Full Changelog](https://github.com/obihann/archey-osx/compare/v1.5...1.5.1-pr)
- Performance improvements [\#34](https://github.com/obihann/archey-osx/pull/34) ([childnode](https://github.com/childnode))

## [1.5.1](https://github.com/obihann/archey-osx/tree/1.5.1) (2015-11-03)
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.5.1-pr...1.5.1)

**Fixed bugs:**

- New Version [\#19](https://github.com/obihann/archey-osx/issues/19)
- Why my uptime string length is so long? [\#18](https://github.com/obihann/archey-osx/issues/18)
- 1.5 IP timeout & Battery [\#17](https://github.com/obihann/archey-osx/issues/17)

**Closed issues:**

- Download link in Readme.md returns 404 Not Found [\#33](https://github.com/obihann/archey-osx/issues/33)

**Merged pull requests:**

- prepping for v1.5.1 [\#32](https://github.com/obihann/archey-osx/pull/32) ([obihann](https://github.com/obihann))
- ip address caching [\#31](https://github.com/obihann/archey-osx/pull/31) ([obihann](https://github.com/obihann))
- Fixing uptime [\#24](https://github.com/obihann/archey-osx/pull/24) ([obihann](https://github.com/obihann))
- updating the regex used to display uptime [\#21](https://github.com/obihann/archey-osx/pull/21) ([obihann](https://github.com/obihann))

## [1.5.1-pr](https://github.com/obihann/archey-osx/tree/1.5.1-pr) (2015-11-03)
[Full Changelog](https://github.com/obihann/archey-osx/compare/v1.5...1.5.1-pr)

**Merged pull requests:**

- Develop [\#30](https://github.com/obihann/archey-osx/pull/30) ([obihann](https://github.com/obihann))
- adding check if battery string is empty [\#29](https://github.com/obihann/archey-osx/pull/29) ([obihann](https://github.com/obihann))
- Adding an array list. [\#28](https://github.com/obihann/archey-osx/pull/28) ([slice27](https://github.com/slice27))
- updating changelog [\#26](https://github.com/obihann/archey-osx/pull/26) ([obihann](https://github.com/obihann))
- Adding offline mode [\#25](https://github.com/obihann/archey-osx/pull/25) ([obihann](https://github.com/obihann))
- Fixing uptime [\#24](https://github.com/obihann/archey-osx/pull/24) ([obihann](https://github.com/obihann))
- Configure logo file location via $ARCHEY\_LOGO\_FILE [\#22](https://github.com/obihann/archey-osx/pull/22) ([theunraveler](https://github.com/theunraveler))
- updating the regex used to display uptime [\#21](https://github.com/obihann/archey-osx/pull/21) ([obihann](https://github.com/obihann))

## [v1.5](https://github.com/obihann/archey-osx/tree/v1.5) (2015-10-06)
[Full Changelog](https://github.com/obihann/archey-osx/compare/v1.4...v1.5)
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.4...v1.5)

**Merged pull requests:**

Expand All @@ -43,11 +54,11 @@
- Simplified ram calculation. [\#5](https://github.com/obihann/archey-osx/pull/5) ([docwhat](https://github.com/docwhat))
- Get user's shell from dscl. [\#3](https://github.com/obihann/archey-osx/pull/3) ([lucsky](https://github.com/lucsky))

## [v1.4](https://github.com/obihann/archey-osx/tree/v1.4) (2014-03-09)
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.4...v1.4)

## [1.4](https://github.com/obihann/archey-osx/tree/1.4) (2014-03-09)
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.3...1.4)
[Full Changelog](https://github.com/obihann/archey-osx/compare/v1.4...1.4)

## [v1.4](https://github.com/obihann/archey-osx/tree/v1.4) (2014-03-09)
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.3...v1.4)

## [1.3](https://github.com/obihann/archey-osx/tree/1.3) (2014-02-07)
[Full Changelog](https://github.com/obihann/archey-osx/compare/1.2...1.3)
Expand All @@ -69,4 +80,4 @@
## [1.0](https://github.com/obihann/archey-osx/tree/1.0) (2013-09-13)


\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
18 changes: 12 additions & 6 deletions bin/archey
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ bash.' && exit 2)

# Detect the packager.
if [ -x /usr/local/bin/brew ]; then
packager=homebrew
detectedpackager=homebrew
elif command -v port >/dev/null; then
packager=macports
detectedpackager=macports
else
packager=none
detectedpackager=none
fi

# Get the command line options
Expand All @@ -20,6 +20,9 @@ opt_offline=f
for arg in "$@"
do
case "${arg}" in
-p|--packager)
packager=$detectedpackager
;;
-m|--macports)
packager=macports
;;
Expand All @@ -36,7 +39,8 @@ do
-h|--help)
echo "Usage: $0 [options]"
echo
echo " -m --macports Use MacPorts as package system (default packager: ${packager})."
echo " -p --packager Use auto detected package system (default packager: ${detectedpackager})."
echo " -m --macports Force use MacPorts as package system."
echo " -b --nocolor Turn color off."
echo " -c --color Force the color on (overrides --nocolor)."
echo " -o --offline Disable the IP address check."
Expand Down Expand Up @@ -72,7 +76,7 @@ uptime=$(uptime | sed 's/.*up \([^,]*\), .*/\1/')
shell="$SHELL"
terminal="$TERM ${TERM_PROGRAM//_/ }"
cpu=$(sysctl -n machdep.cpu.brand_string)
battery=$(ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%", $10/$5 * 100)}')
battery=$(ioreg -c AppleSmartBattery -r | awk '$1~/Capacity/{c[$1]=$3} END{OFMT="%.2f%%"; max=c["\"MaxCapacity\""]; print (max>0? 100*c["\"CurrentCapacity\""]/max: "?")}')

# removes (R) and (TM) from the CPU name so it fits in a standard 80 window
cpu=$(echo "$cpu" | awk '$1=$1' | sed 's/([A-Z]\{1,2\})//g')
Expand Down Expand Up @@ -115,7 +119,9 @@ fieldlist[${#fieldlist[@]}]="${textColor}Kernel:${normal} ${kernel}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Uptime:${normal} ${uptime}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Shell:${normal} ${shell}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Terminal:${normal} ${terminal}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Packages:${normal} ${packagehandler}${normal}"
if [ ${packagehandler} -ne 0 ]; then
fieldlist[${#fieldlist[@]}]="${textColor}Packages:${normal} ${packagehandler}${normal}"
fi
fieldlist[${#fieldlist[@]}]="${textColor}CPU:${normal} ${cpu}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Memory:${normal} ${ram}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Disk:${normal} ${disk}${normal}"
Expand Down

0 comments on commit d3bbad2

Please sign in to comment.