REBOL_HOME
[1/11] from: mumpsoid::gmx::com at: 27-Mar-2009 21:28
I set the REBOL_HOME env. var. to point to $HOME/rebol where I want
all my REBOL scripts scripts to live. Either the interpreter does not
recognize this env. var. or I'm missing something, cuz when I do:
load %blah.r => no joy
load rebol/%blah.r => no joy
Do I need to specify the complete path for REBOL to find files?
Anybody else having issues with REBOL_HOME?
--
Duke Normandin
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[2/11] from: tim-johnsons:web at: 28-Mar-2009 8:02
On Friday 27 March 2009, mumpsoid-gmx.com wrote:
> I set the REBOL_HOME env. var. to point to $HOME/rebol where I want
> all my REBOL scripts scripts to live. Either the interpreter does not
<<quoted lines omitted: 3>>
> Do I need to specify the complete path for REBOL to find files?
> Anybody else having issues with REBOL_HOME?
I've used rebol on linux for over 8 years. I never did get REBO_HOME to work.
I've gotten used to a customized user.r which is either loaded explicitly
as in load %/some/path/to/user.r or resides in the same directory as
the executable script. Even with a cgi script, the rebol binary appears to
check for a user.r in the same directory as the script.
I went on to customize user.r with a system path variable and an import
scheme. Code available if you want.
[tim: almost-60]
[3/11] from: mumpsoid:gmx at: 28-Mar-2009 10:44
On Sat, 28 Mar 2009, Tim Johnson wrote:
> On Friday 27 March 2009, mumpsoid-gmx.com wrote:
> > I set the REBOL_HOME env. var. to point to $HOME/rebol where I want
<<quoted lines omitted: 14>>
> scheme. Code available if you want.
> [tim: almost-60]
Hey Carl S. -- are you listening in on this?
Hello Tim....
I'd appreciate your code that works-around this PITA. REBOL_HOME would
have been way too cool I suppose. I think that the problem is in the
semantics between the *nix definition of $HOME and HOME means to the
rest of computer-dom.
Carl S. ---- is this easily fixable?
Almost 60!!!! Start counting backwards NOW - young man. You'll live
to enjoy it ;))
--
Duke Normandin
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[4/11] from: tim-johnsons::web::com at: 28-Mar-2009 10:54
On Saturday 28 March 2009, mumpsoid-gmx.com wrote:
> Hey Carl S. -- are you listening in on this?
Disclaimer: I couldn't get it to work, doesn't mean it doesn't work...
> I'd appreciate your code that works-around this PITA. REBOL_HOME would
> have been way too cool I suppose. I think that the problem is in the
> semantics between the *nix definition of $HOME and HOME means to the
> rest of computer-dom.
I did come to something like that conclusion too.
> Carl S. ---- is this easily fixable?
>
> Almost 60!!!! Start counting backwards NOW - young man. You'll live
> to enjoy it ;))
Yeah. By 5..
tj
[5/11] from: moliad:gmai:l at: 30-Mar-2009 15:06
Hi all,
you can use the library system to get the env. directly... since its now
free as of v2.7.6 its not a big deal.
but you still need to source the config (user.r) script manually then.
--------------------------------------------------------------
;- libc
libc*: context [
libc: make library! switch system/version/4 [
2 [%libc.dylib] ; OSX
3 [%msvcrt.dll] ; Windows
4 [%libc.so] ; Linux
7 [%libc.so] ; FreeBSD
8 [%libc.so] ; NetBSD
9 [%libc.so] ; OpenBSD
10 [%libc.so] ; Solaris
]
getenv: make routine! [
"Get an environment variable."
in-string [string!] "Name of an environment variable"
return: [string!]
] libc "getenv"
]
;- getenv
getenv: func [
"REBOL friendly getenv function"
varname [word! string!]
][
varname: to-string varname
if find varname " " [
to-error "os.getenv() varname may not contain spaces."
]
return libc*/getenv as-string varname
]
home-path: probe get-env 'HOME
do join dirize to-rebol-file home-path %rebol-user-config.r
-------------------------------------------------------
HTH!
-MAx
[6/11] from: moliad::gmail::com at: 30-Mar-2009 15:08
ooops, note it should be:
home-path: probe getenv 'HOME
(no dash in getenv)
-MAx
[7/11] from: anton:wilddsl:au at: 31-Mar-2009 14:47
Hi,
Not sure if this helps, but here are some things I did.
On linux, the VIEW-ROOT setting seems to be hardcoded in the
rebol binary to ~/.rebol/view/
I wanted to locate all my rebol scripts in ~/dev/rebol/view/, so
I symlinked ~/.rebol -> ~/dev/rebol in my home directory, like so:
ln -s dev/rebol/ .rebol
I also have this line in my user.r
if system/options/home = %/home/anton/ [ ; as on linux
system/options/home: %/home/anton/dev/rebol/view/
]
When you start rebol, check the following values in the console
to see if everything looks right:
view-root
system/options/home
system/options/path
system/options/boot
what-dir <-- Returns current directory. Affected by CHANGE-DIR
Regards,
Anton.
mumpsoid-gmx.com wrote:
[8/11] from: mumpsoid:gmx at: 31-Mar-2009 5:35
On Tue, 31 Mar 2009, Anton Rolls wrote:
> Hi,
> Not sure if this helps, but here are some things I did.
<<quoted lines omitted: 26>>
> > Do I need to specify the complete path for REBOL to find files?
> > Anybody else having issues with REBOL_HOME?
Thank you, Anton. Thanks to good-old-*nix, the above is a suitable
work-around. Much appreciated.
--
Duke Normandin
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[9/11] from: mumpsoid::gmx::com at: 31-Mar-2009 5:42
On Mon, 30 Mar 2009, Maxim Olivier-Adlhoch wrote:
> Hi all,
> you can use the library system to get the env. directly... since its now
<<quoted lines omitted: 34>>
> HTH!
> -MAx
I don't yet understand REBOL enough or it's inner workings to "see"
how the above code would point the interpreter to where I want REBOL's
script home
to be.
--
Duke Normandin
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[10/11] from: moliad::gmail::com at: 31-Mar-2009 20:02
hi,
I guess you refer to my script :-)
its just a rebol implementation of the getenv function which allows you
retrieve any of the system's environment variables.
-MAx
On Tue, Mar 31, 2009 at 7:42 AM, <mumpsoid-gmx.com> wrote:
[11/11] from: mumpsoid::gmx::com at: 31-Mar-2009 19:11
On Tue, 31 Mar 2009, Maxim Olivier-Adlhoch wrote:
> hi,
> I guess you refer to my script :-)
<<quoted lines omitted: 64>>
> > "script home" to be.
> > --
Please do not top-post....
Thank you for the script's explanation. I have saved it in my REBOL-snippets
file. You never know.....? L8r..
--
Duke Normandin
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted