diff --git a/debian/changelog b/debian/changelog index 6eccc502..ac18980f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/usr/bin/byobu b/usr/bin/byobu index ba2d2048..cc040f6a 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -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" diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index a93a7f62..e3bced1e 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -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 diff --git a/usr/lib/byobu/disk_io b/usr/lib/byobu/disk_io index b9192b22..dc08c1d6 100755 --- a/usr/lib/byobu/disk_io +++ b/usr/lib/byobu/disk_io @@ -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 diff --git a/usr/lib/byobu/include/constants b/usr/lib/byobu/include/constants index 1dc24eaf..1d6abce2 100755 --- a/usr/lib/byobu/include/constants +++ b/usr/lib/byobu/include/constants @@ -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