diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-02-24 02:57:12 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-02-24 02:57:12 -0800 |
| commit | 1dbece8b2ef96eb03ccbc7f6b5e794d66a647d38 (patch) | |
| tree | fdcc7599c23799bc6a8c7b1610ff94969743802d /bb.h | |
| parent | 9a7938ba2d0814b14003e7dcae904d98ca79ad8e (diff) | |
Added a slightly hacky fix to make sure `bb` can be run from the local
build directory and still have the helper scripts, bbstartup.sh, and the
bindings work.
Diffstat (limited to 'bb.h')
| -rw-r--r-- | bb.h | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -244,11 +244,14 @@ static const char *description_str = "bb - an itty bitty console TUI file browse static const char *usage_str = "Usage: bb (-h/--help | -v/--version | -s | -d | -0 | +command)* [[--] directory]\n"; static const char *runstartup = -"for path in \"$XDG_CONFIG_HOME/bb\" \"$sysconfdir/xdg/bb\" .; do\n" -" if [ -e \"$path/bbstartup.sh\" ]; then\n" -" . \"$path/bbstartup.sh\";\n" -" break;\n" -" fi;\n" -"done\n"; +"if [ \"$BBPATH\" ]; then\n" +" . \"$BBPATH/bbstartup.sh\"\n" +"else\n" +" for path in \"$XDG_CONFIG_HOME/bb\" \"$sysconfdir/xdg/bb\"; do\n" +" [ -e \"$path/bbstartup.sh\" ] || continue\n" +" . \"$path/bbstartup.sh\"\n" +" break\n" +" done\n" +"fi\n"; // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
