diff options
author | Carsten Haitzler <raster@rasterman.com> | 2006-07-21 15:55:54 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2006-07-21 15:55:54 +0000 |
commit | d698e6cc34b97183c4f5911fbf85bd1e9e9b7b55 (patch) | |
tree | 54e8e3ef264f59e3c2eef2e15ed9b237b91ab538 /src/bin/e_prefix.c | |
parent | 59a61a6ef504ab11b6012499cc8faeda8136c544 (diff) | |
download | enlightenment-d698e6cc34b97183c4f5911fbf85bd1e9e9b7b55.tar.gz |
some prefix fixes for env vars
SVN revision: 24104
Diffstat (limited to 'src/bin/e_prefix.c')
-rw-r--r-- | src/bin/e_prefix.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/bin/e_prefix.c b/src/bin/e_prefix.c index 5cbaa46e08..495e1ce15e 100644 --- a/src/bin/e_prefix.c +++ b/src/bin/e_prefix.c @@ -37,33 +37,28 @@ e_prefix_determine(char *argv0) { _prefix_path = strdup(getenv("E_PREFIX")); if (getenv("E_BIN_DIR")) - _prefix_path_bin = strdup(getenv("E_BIN_DIR")); + snprintf(buf, sizeof(buf), "%s/bin", getenv("E_BIN_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/bin", _prefix_path); - _prefix_path_bin = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/bin", _prefix_path); + _prefix_path_bin = strdup(buf); + if (getenv("E_LIB_DIR")) - _prefix_path_bin = strdup(getenv("E_LIB_DIR")); + snprintf(buf, sizeof(buf), "%s/lib", getenv("E_LIB_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/lib", _prefix_path); - _prefix_path_lib = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/lib", _prefix_path); + _prefix_path_lib = strdup(buf); + if (getenv("E_DATA_DIR")) - _prefix_path_data = strdup(getenv("E_DATA_DIR")); + snprintf(buf, sizeof(buf), "%s/"SHARE_D, getenv("E_DATA_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/"SHARE_D, _prefix_path); - _prefix_path_data = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/"SHARE_D, _prefix_path); + _prefix_path_data = strdup(buf); + if (getenv("E_LOCALE_DIR")) - _prefix_path_locale = strdup(getenv("E_LOCALE_DIR")); + snprintf(buf, sizeof(buf), "%s/"LOCALE_D, getenv("E_LOCALE_DIR")); else - { - snprintf(buf, sizeof(buf), "%s/"LOCALE_D, _prefix_path); - _prefix_path_locale = strdup(buf); - } + snprintf(buf, sizeof(buf), "%s/"LOCALE_D, _prefix_path); + _prefix_path_data = strdup(buf); return 1; } /* no env var - examine process and possible argv0 */ |