Skip to content

Commit f6d7b19

Browse files
committed
initial commit
0 parents  commit f6d7b19

9 files changed

+521
-0
lines changed

.clang-format

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
UseTab: Always
3+
IndentWidth: 4
4+
TabWidth: 4
5+
# BasedOnStyle: LLVM

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Makefile
2+
*.make
3+
bin
4+
obj
5+
.cache

LICENSE

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2024, Lance Borden
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice, this
9+
list of conditions and the following disclaimer.
10+
11+
2. Redistributions in binary form must reproduce the above copyright notice,
12+
this list of conditions and the following disclaimer in the documentation
13+
and/or other materials provided with the distribution.
14+
15+
3. Neither the name of the copyright holder nor the names of its
16+
contributors may be used to endorse or promote products derived from
17+
this software without specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Lunar Shell
2+
3+
Lunar Shell (lush) is an open source unix shell with a single goal in mind. That goal is to offer the ability to write shell scripts for your operating system entirely in Lua. The Lua scripting language has many powerful features that allow for more control in the hands of the user to automate tasks on their machine.
4+
5+
## Compiling
6+
7+
Clone the repo and run the install script.
8+
9+
```
10+
git clone https://github.com/BanceDev/lush.git
11+
cd lush
12+
sh install.sh
13+
```
14+
15+
For future compiles just run ```make``` from the root directory. If you change the premake5.lua file rebuild the makefiles with ```premake5 gmake```.
16+
17+
## Releases
18+
19+
Binary builds are available from [releases](https://github.com/BanceDev/lush/releases).
20+
21+
## Contributing
22+
23+
- For bug reports and feature suggestions please use [issues](https://github.com/BanceDev/lush/issues).
24+
- If you wish to contribute code of your own please submit a [pull request](https://github.com/BanceDev/lush/pulls).
25+
- Note: It is likely best to submit an issue before a PR to see if the feature is wanted before spending time making a commit.
26+
- All help is welcome!

compile_commands.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"arguments": [
4+
"/usr/bin/cc",
5+
"-DDEBUG",
6+
"-g",
7+
"-c",
8+
"-o",
9+
"obj/Debug/lush.o",
10+
"src/lush.c"
11+
],
12+
"directory": "/home/lanceb/projects/lush",
13+
"file": "/home/lanceb/projects/lush/src/lush.c",
14+
"output": "/home/lanceb/projects/lush/obj/Debug/lush.o"
15+
}
16+
]

install.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
PREMAKE_VERSION="5.0.0-beta2"
4+
OS="linux"
5+
6+
echo "downloading premake $PREMAKE_VERSION"
7+
wget -q https://github.com/premake/premake-core/releases/download/v${PREMAKE_VERSION}/premake-${PREMAKE_VERSION}-${OS}.tar.gz -O premake.tar.gz
8+
echo "extracting premake"
9+
tar -xzf premake.tar.gz
10+
echo "installing premake"
11+
sudo mv premake5 example.so libluasocket.so /usr/bin
12+
sudo chmod +x /usr/bin/premake5
13+
rm premake.tar.gz
14+
15+
premake5 gmake
16+
make
17+
18+
sudo cp ./bin/Debug/lush/lush /usr/bin/lush
19+
20+
if ! grep -Fxq "/usr/bin/lush" /etc/shells; then
21+
echo "/usr/bin/lush" | sudo tee -a /etc/shells >/dev/null
22+
fi
23+
24+
chsh -s /usr/bin/lush
25+
26+
echo "====================="
27+
echo "INSTALLATION FINISHED"
28+
echo "====================="

premake5.lua

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
workspace("lush")
2+
configurations({ "Debug", "Release" })
3+
4+
-- lush project
5+
project("lush")
6+
kind("ConsoleApp")
7+
language("C")
8+
targetdir("bin/%{cfg.buildcfg}/lush")
9+
10+
files({
11+
"src/**.h",
12+
"src/**.c",
13+
})
14+
15+
filter("configurations:Debug")
16+
defines({ "DEBUG" })
17+
symbols("On")
18+
19+
filter("configurations:Release")
20+
defines({ "NDEBUG" })
21+
optimize("On")

0 commit comments

Comments
 (0)