* usr/bin/byobu, usr/bin/byobu-janitor, usr/lib/byobu/disk_io,

usr/lib/byobu/include/constants:
  - use BYOBU_READLINK instead of READLINK
This commit is contained in:
Dustin Kirkland 2012-01-28 12:47:33 -06:00
commit db908e78d2
5 changed files with 10 additions and 7 deletions

3
debian/changelog vendored
View file

@ -22,6 +22,9 @@ byobu (5.6) unreleased; urgency=low
usr/share/byobu/keybindings/f-keys: LP: #920661
- byobu should not set environment variable 'SED'
- use BYOBU_SED instead
* usr/bin/byobu, usr/bin/byobu-janitor, usr/lib/byobu/disk_io,
usr/lib/byobu/include/constants:
- use BYOBU_READLINK instead of READLINK
[ Ryan Thompson ]
* usr/bin/byobu-select-session: LP: #919391

View file

@ -38,8 +38,8 @@ if [ -r "$HOME/.byoburc" ]; then
fi
if [ -z "${BYOBU_PREFIX}" ]; then
# Find and export the installation location prefix
command -v greadlink >/dev/null 2>&1 && export READLINK="greadlink" || export READLINK="readlink"
prefix="$(dirname $(dirname $($READLINK -f $0)))"
command -v greadlink >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
prefix="$(dirname $(dirname $($BYOBU_READLINK -f $0)))"
if [ "$prefix" != "/usr" ]; then
echo "export BYOBU_PREFIX='$prefix'" >> "$HOME/.byoburc"
. "$HOME/.byoburc"

View file

@ -77,7 +77,7 @@ for f in status statusrc; do
cp -f "$BYOBU_PREFIX/share/$PKG/status/$f" "$BYOBU_CONFIG_DIR/$f"
# Enable ec2_cost, if we're in ec2 and seeding a new setup
if metadata_available; then
$BYOBU_SED -i -e "s/#ec2_cost/ec2_cost/g" "$($READLINK -f $BYOBU_CONFIG_DIR/$f)"
$BYOBU_SED -i -e "s/#ec2_cost/ec2_cost/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/$f)"
fi
fi
done
@ -91,7 +91,7 @@ fi
# Affects: Upgrades from <= byobu-2.78 which might have "motd+shell"
# in their window list; update this to just "shell"
if grep -qs "motd+shell" "$BYOBU_CONFIG_DIR/windows"; then
$BYOBU_SED -i -e "s/motd+shell/shell/g" "$($READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
$BYOBU_SED -i -e "s/motd+shell/shell/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
fi
# Affects: Upgrades from <= byobu 4.3, remove ec2_rates
@ -99,7 +99,7 @@ rm -f "$BYOBU_CONFIG_DIR/ec2_rates"
# Affects: Upgrades from <= byobu 4.4, update "shell" -> "byobu-shell"
if grep -qs " shell$" "$BYOBU_CONFIG_DIR/windows"; then
$BYOBU_SED -i -e "s/ shell$/ $PKG-shell/g" "$($READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
$BYOBU_SED -i -e "s/ shell$/ $PKG-shell/g" "$($BYOBU_READLINK -f $BYOBU_CONFIG_DIR/windows)" || true
fi
# Affects: Upgrades from <= byobu 4.22

View file

@ -31,7 +31,7 @@ __disk_io_detail() {
getdisk() {
local t=""
if [ -L "${1}" ]; then
t=$($READLINK -f "$1")
t=$($BYOBU_READLINK -f "$1")
else
t="$1"
fi

View file

@ -95,7 +95,7 @@ esac
# MacOS Support
command -v gsed >/dev/null 2>&1 && export BYOBU_SED="gsed" || export BYOBU_SED="sed"
command -v greadlink >/dev/null 2>&1 && export READLINK="greadlink" || export READLINK="readlink"
command -v greadlink >/dev/null 2>&1 && export BYOBU_READLINK="greadlink" || export BYOBU_READLINK="readlink"
command -v sensible-pager >/dev/null 2>&1 && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less"
# Default colors