Ejemplo n.º 1
0
        private static void SetupGearEnv(Dictionary <string, string> targetList, string homeDir)
        {
            Logger.Info("oo-trap-user setting up vars for home directory '{0}'", homeDir);

            if (targetList == null)
            {
                throw new ArgumentNullException("targetList");
            }

            string globalEnv = Path.Combine(NodeConfig.ConfigDir, "env");

            UserShellTrap.LoadEnv(globalEnv, targetList);

            UserShellTrap.LoadEnv(Path.Combine(homeDir, ".env"), targetList);

            foreach (string dir in Directory.GetDirectories(Path.Combine(homeDir, ".env"), "*"))
            {
                LoadEnv(dir, targetList);
            }

            string[] userHomeDirs = Directory.GetDirectories(homeDir, "*", SearchOption.TopDirectoryOnly);

            foreach (string userHomeDir in userHomeDirs)
            {
                LoadEnv(Path.Combine(userHomeDir, "env"), targetList);
            }
        }
Ejemplo n.º 2
0
 static int Main(string[] args)
 {
     return(UserShellTrap.StartShell(Environment.CommandLine));
 }