Skip to content

Commit

Permalink
Merge pull request #39 from javizqh/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
javizqh authored May 16, 2023
2 parents 68822e4 + 9970c32 commit 872e0c5
Show file tree
Hide file tree
Showing 8 changed files with 527 additions and 391 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ all: $(OUTPUT) $(MAIN)

$(MAIN): $(OBJECTS)
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $(OUTPUTMAIN) $(OBJECTS) $(LFLAGS) $(LIBS)
# @./indent.sh */builtin/*.[ch]
@./indent.sh */builtin/*.[ch]
@./indent.sh */*.[c]

# this is a suffix replacement rule for building .o's from .c's
# it uses automatic variables $<: the name of the prerequisite of
Expand Down
1 change: 0 additions & 1 deletion build/.keep

This file was deleted.

4 changes: 4 additions & 0 deletions include/builtin/source.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ int add_source(char *source_file_name, int error_fd);
int exec_sources();

int read_source_file(char *filename);

int find_path_srcfile(char *filename);

int file_exists(char *path);
6 changes: 3 additions & 3 deletions install
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

NAME="Mash"
NAME="mash"

mkdir build/
make
chmod +x build/main
chmod +x build/mash

echo -e '#!/bin/bash\nOLDDIR="$PWD"\ncd "'$PWD'"\n ./build/main $@\nP_STATUS=$(echo $?)\ncd "$OLDDIR"\nexit $P_STATUS' > /usr/bin/$NAME
cp $PWD/build/mash /usr/bin/mash
#cp CLI/$NAME.1.gz /usr/share/man/man1/$NAME.1.gz

chmod +x /usr/bin/$NAME
Expand Down
Loading

0 comments on commit 872e0c5

Please sign in to comment.