mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-select-profile:
- find a suitable hash sum utility (fixes Mac OS X)
This commit is contained in:
parent
768e0ca353
commit
2bc356990f
2 changed files with 13 additions and 3 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -13,6 +13,8 @@ byobu (5.30) unreleased; urgency=low
|
|||
- fix lintian info messages
|
||||
* NEWS:
|
||||
- point to byobu.co in NEWS file
|
||||
* usr/bin/byobu-select-profile:
|
||||
- find a suitable hash sum utility (fixes Mac OS X)
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sat, 19 Jan 2013 14:18:01 -0600
|
||||
|
||||
|
|
|
@ -49,6 +49,14 @@ COLORS="default_light \
|
|||
yellow \
|
||||
brown"
|
||||
|
||||
# Find a hash utility
|
||||
for i in md5sum md5 sha512sum sha256sum sha1sum shasum shasum5.12 shasum5.10; do
|
||||
if $BYOBU_TEST $i >/dev/null 2>&1; then
|
||||
HASH="$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
usage () {
|
||||
cat <<EOT
|
||||
Usage: $0 [(-l|--list)][(-h|--help)]
|
||||
|
@ -225,7 +233,7 @@ else
|
|||
break
|
||||
;;
|
||||
-h|--hostname)
|
||||
color=$(hostname | md5sum | head -c 6)
|
||||
color=$(hostname | $HASH | head -c 6)
|
||||
setcolor_tmux "$color"
|
||||
shift
|
||||
break
|
||||
|
@ -233,13 +241,13 @@ else
|
|||
-i|--ip)
|
||||
[ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc"
|
||||
. $BYOBU_PREFIX/lib/$PKG/ip_address
|
||||
color=$(__ip_address t| md5sum | head -c 6)
|
||||
color=$(__ip_address t| $HASH | head -c 6)
|
||||
setcolor_tmux "$color"
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-r|--random)
|
||||
color=$(head -c 10 /dev/urandom | md5sum | head -c 6)
|
||||
color=$(head -c 10 /dev/urandom | $HASH | head -c 6)
|
||||
setcolor_tmux "$color"
|
||||
shift
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue