I like weex and I often use it for uploading websites when I only have FTP access (otherwise, I normally use rsync).
All my websites' files live in version management, with checkouts on multiple machines (of different colleagues). What I would like is if I could keep the weex config (and cache, if possible) in the project dir.
Is it possible to specify to weex where it should look for its config file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-12-29
It is possible to modify a bit the source code to permit the specification of a weex "home directory" (instead of ~/.weex) where the files weexrc, weex.cache.* and weex.log would be read/created. I think this would address the issue and it can be quite easily done.
Here is a quick'n dirty howto :
1. In src/weex.c, add a command line option like (on line 58 in example) :
{ 'w', "whome", OPT_STRING, &whome, 0 },
2. In src/variable.h add the global variable "whome" to hold the specified weex home directory. In example on line 85 :
GLOBAL char *whome;
3. In src/config.c, modify function config_location(void) , line 85:
if (whome) temp=str_concat(whome,"/weexrc",NULL);
else temp=str_concat(getenv("HOME"),"/.weex/weexrc",NULL);
4. In src/cache.c modify function load_cache(void) , line 59 :
if (whome) temp=str_concat(whome,"/weex.cache.",cfgSectionNumberToName(host_number),NULL);
else temp=str_concat(getenv("HOME"),"/.weex/weex.cache.",cfgSectionNumberToName(host_number),NULL);
5. In src/log.c modify function *log_open(void), line 79 :
I also would like to specify conffile from command line. I keep websites in code repositories and I also would like to keep weex conffile this way. Having to copy this file to user home in different machines and update it on each change and merge serveral weex conffiles when working with more than one project is a little annoying.
Thanks,
txemi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I like weex and I often use it for uploading websites when I only have FTP access (otherwise, I normally use rsync).
All my websites' files live in version management, with checkouts on multiple machines (of different colleagues). What I would like is if I could keep the weex config (and cache, if possible) in the project dir.
Is it possible to specify to weex where it should look for its config file?
The config file has to be in ~/.weexrc or ~/.weex/weexrc.
Cheers,
Ludo.
--
http://www.geeksback.com - Secure File Backups for Geeks
http://www.palmopensource.com - The PalmOS Open Source Portal
It is possible to modify a bit the source code to permit the specification of a weex "home directory" (instead of ~/.weex) where the files weexrc, weex.cache.* and weex.log would be read/created. I think this would address the issue and it can be quite easily done.
Here is a quick'n dirty howto :
1. In src/weex.c, add a command line option like (on line 58 in example) :
2. In src/variable.h add the global variable "whome" to hold the specified weex home directory. In example on line 85 :
3. In src/config.c, modify function config_location(void) , line 85:
4. In src/cache.c modify function load_cache(void) , line 59 :
5. In src/log.c modify function *log_open(void), line 79 :
6. You are done ! You can now try :
Cheers
Something is missing, I forgot that the .lock file should also be removed ^^
5b. in src/log.c modify function log_close(FILE *fp), line 131 (after mod #5) :
and.. weepee it's working !
I also would like to specify conffile from command line. I keep websites in code repositories and I also would like to keep weex conffile this way. Having to copy this file to user home in different machines and update it on each change and merge serveral weex conffiles when working with more than one project is a little annoying.
Thanks,
txemi