mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-05 20:42:26 +00:00
gethome() moved back to vpkConf module.
This commit is contained in:
parent
296803f7f5
commit
7a741b509a
2 changed files with 10 additions and 10 deletions
|
|
@ -4,7 +4,15 @@ IMPORT Out, Files, Strings, Platform,
|
|||
|
||||
VAR
|
||||
conf, confDir : ARRAY 256 OF CHAR;
|
||||
|
||||
|
||||
PROCEDURE getHome(VAR path: ARRAY OF CHAR);
|
||||
BEGIN
|
||||
IF ~(Platform.getEnv("HOME", path)) THEN
|
||||
Out.String("HOME variable is not found"); Out.Ln;
|
||||
HALT(1);
|
||||
END;
|
||||
END getHome;
|
||||
|
||||
PROCEDURE mkConfContent(VAR path: ARRAY OF CHAR);
|
||||
BEGIN
|
||||
Strings.Append('{"path" : "', path);
|
||||
|
|
@ -40,7 +48,7 @@ PROCEDURE setConfPath;
|
|||
VAR
|
||||
home: ARRAY 128 OF CHAR;
|
||||
BEGIN
|
||||
vpkSettings.getHome(home);
|
||||
getHome(home);
|
||||
mkConfDirPath(home, confDir);
|
||||
conf := confDir;
|
||||
Strings.Append("/", conf);
|
||||
|
|
|
|||
|
|
@ -13,12 +13,4 @@ CONST
|
|||
port* = "80";
|
||||
installPath* = "dependencies";
|
||||
|
||||
PROCEDURE getHome*(VAR path: ARRAY OF CHAR);
|
||||
BEGIN
|
||||
IF ~(Platform.getEnv("HOME", path)) THEN
|
||||
Out.String("HOME variable is not found"); Out.Ln;
|
||||
HALT(1);
|
||||
END;
|
||||
END getHome;
|
||||
|
||||
END vpkSettings.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue