Skip to content

Commit

Permalink
DONE !
Browse files Browse the repository at this point in the history
  • Loading branch information
ggjulio committed Sep 20, 2020
1 parent e078ab2 commit b8789ff
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 203 deletions.
16 changes: 1 addition & 15 deletions srcs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,14 @@
/* By: juligonz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/20 13:32:17 by juligonz #+# #+# */
/* Updated: 2020/09/20 00:15:57 by juligonz ### ########.fr */
/* Updated: 2020/09/20 18:48:10 by juligonz ### ########.fr */
/* */
/* ************************************************************************** */

#include "minishell.h"

t_shell g_sh;

static void execute_string(char *input)
{
char **commands;

commands = split_input(input);
if (commands != NULL)
{
run_shell_commands(commands);
ft_free_array(commands);
}
}

int main(int ac, const char **av, t_environment envp)
{
g_sh = create_shell(av[0], envp);
Expand All @@ -35,8 +23,6 @@ int main(int ac, const char **av, t_environment envp)
run_shell();
ft_dprintf(STDERR_FILENO, "exit\n");
}
else if (ac == 3 && !ft_strcmp("-c", av[1]))
execute_string((char *)av[2]);
else
ft_dprintf(STDERR_FILENO,
"minishell: Invalid arguments.\nUsage : ./minishell\n");
Expand Down
76 changes: 0 additions & 76 deletions tests

This file was deleted.

112 changes: 0 additions & 112 deletions unset_all_variables.txt

This file was deleted.

0 comments on commit b8789ff

Please sign in to comment.