massive changeset to use BYOBU_PREFIX and allow for relocation (or installation as non-root)

This commit is contained in:
Live session user 2010-07-28 13:19:18 +00:00
commit be50c29d9e
8 changed files with 19 additions and 7 deletions

View file

@ -19,7 +19,14 @@
PKG="byobu"
VERSION=2.83
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX
if [ ! -x "$BYOBU_PREFIX/bin/$PKG" ]; then
echo "ERROR: Cannot find $BYOBU_PREFIX/bin/$PKG" 2>&1
echo "ERROR: If you have installed it elsewhere, export BYOBU_PREFIX in your shell" 2>&1
exit 1
fi
# Add a version argument for debugging purposes
if [ "$#" = "1" ] && [ "$1" = "-v" ]; then

View file

@ -20,7 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu"
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
RUN="$SOCKETDIR/S-$USER"
FLAG="$RUN/$PKG.reload-required"

View file

@ -17,7 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX
if [ ! -e "$HOME/.byobu/disable-autolaunch" ]; then
case "$TERM" in

View file

@ -23,7 +23,8 @@
# ./debian/rules get-po
PKG="byobu"
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX
[ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" || SOCKETDIR="/var/run/screen"
TEXTDOMAIN="$PKG"

View file

@ -18,7 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu"
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX="/usr"
export BYOBU_PREFIX
find_script () {
# Allow for local status scripts

View file

@ -41,5 +41,5 @@ register s "^a[g G$>^h" # Goes with ^a~ definition
bind ~ eval 'process s' 'exec sed -i "/./,/^$/!d" /var/run/screen/S-$USER/byobu-exchange' 'echo "See: /var/run/screen/S-$USER/byobu-exchange"' # ctrl-a ~ | write the buffer to file
# toggle f-key keybindings off
register d "^a:source /usr/share/byobu/keybindings/screen-escape-keys^M"
register d "^a:source $BYOBU_PREFIX/share/byobu/keybindings/screen-escape-keys^M"
bind ! eval 'process d' 'backtick 111 9999999 9999999 byobu-status menu --disable-f-keys'

View file

@ -48,5 +48,5 @@ bind @ screen -t config 0 byobu-config
# ctrl-a-$ Show detailed status
bind $ screen -t status 0 byobu-status-detail
# ctrl-a-! Toggle f-key keybindings on
register e "^a:source /usr/share/byobu/keybindings/f-keys^M"
register e "^a:source $BYOBU_PREFIX/share/byobu/keybindings/f-keys^M"
bind ! eval 'process e' 'backtick 111 9999999 9999999 byobu-status menu'

View file

@ -21,6 +21,8 @@
PKG=byobu
RUNS=100
[ -z "$BYOBU_PREFIX" ] && BYOBU_PREFIX="/usr"
export BYOBU_PREFIX
loop() {
for j in $(seq 1 $RUNS); do