Move sh to its own directory.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-12-04 17:39:41 +01:00
parent 99f27d5eb1
commit d8df769692
8 changed files with 42 additions and 7 deletions

View File

@ -16,6 +16,7 @@ games \
mbr \
mkinitrd \
regress \
sh \
tix \
utils \
kernel

View File

@ -182,7 +182,7 @@ Sortix comes with a number of home-made programs. Here is an overview:
* `regress` - run system tests
* `rm` - remove file
* `rmdir` - remove empty directory
* `sh` - alias for the shell
* `sh` - command shell
* `sleep` - delay for a specified amount of time
* `sort` - sort lines of text files
* `tail` - display end of file
@ -494,6 +494,12 @@ driver program.
This program converts a binary file to an C array.
### sh ###
This is the Sortix shell. Currently the `sh` program is a wrapper that looks for
a better non-interactive shell if running a script, otherwise it invokes the
hacky `sortix-sh` program.
### Sortix Kernel ###
The Sortix kernel is the core of the Sortix operating system. It provides all

2
sh/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
sh
sortix-sh

30
sh/Makefile Normal file
View File

@ -0,0 +1,30 @@
SOFTWARE_MEANT_FOR_SORTIX=1
include ../build-aux/platform.mak
include ../build-aux/compiler.mak
include ../build-aux/version.mak
include ../build-aux/dirs.mak
OPTLEVEL?=$(DEFAULT_OPTLEVEL)
CXXFLAGS?=$(OPTLEVEL)
CPPFLAGS:=$(CPPFLAGS) -DVERSIONSTR=\"$(VERSION)\"
CXXFLAGS:=$(CXXFLAGS) -Wall -Wextra -fno-exceptions -fno-rtti
BINARIES:=sh sortix-sh
all: $(BINARIES)
.PHONY: all install clean
install: all
mkdir -p $(DESTDIR)$(BINDIR)
install $(BINARIES) $(DESTDIR)$(BINDIR)
sortix-sh: sh.cpp
$(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) $< -o $@
sh: proper-sh.cpp
$(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) $< -o $@
clean:
rm -f $(BINARIES) *.o

View File

@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
sh.cpp
proper-sh.cpp
Forward execution to the best shell.
*******************************************************************************/

View File

@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
sortix-sh.cpp
sh.cpp
A hacky Sortix shell.
*******************************************************************************/

2
utils/.gitignore vendored
View File

@ -32,10 +32,8 @@ pager
pwd
rm
rmdir
sh
sleep
sort
sortix-sh
tail
time
tr

View File

@ -44,10 +44,8 @@ pager \
pwd \
rm \
rmdir \
sh \
sleep \
sort \
sortix-sh \
tail \
time \
tr \