diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..76d1e1c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/xrsh-apps"] + path = src/xrsh-apps + url = https://forgejo.isvery.ninja/xrsh/xrsh-apps.git diff --git a/README.md b/README.md index e1fd122..7924da1 100644 --- a/README.md +++ b/README.md @@ -8,21 +8,23 @@ See [the wiki here](https://forgejo.isvery.ninja/xrsh/xrsh/wiki/Home#milestones) ## Install -No need! Just surf to the public version [here](https://coderofsalvation.github.io/xrsh) or download the [standalone binary](https://) in the releases section
-The apps live in the [apps-repo](https://github.com/coderofsalvation/xrsh-apps).
+ +> NOTE: installation not needed, just surf to the public version [here](https://coderofsalvation.github.io/xrsh) + +1. Download [xrsh.com](https://forgejo.isvery.ninja/xrsh/xrsh/raw/branch/main/xrsh.com) +2. run `chmod +x xrsh.com` in your console +3. run `./xrsh.com` +4. Profit! ✔ ## Developers +Make sure to clone the repo including the [xrsh-apps](https://forgejo.isvery.ninja/xrsh-apps) repo + ``` -$ git clone https://forgejo.isvery.ninja/xrsh/xrsh -$ git clone https://forgejo.isvery.ninja/xrsh/xrsh-apps -$ cd xrsh/src -$ ln -s ../../xrsh-apps/app . -$ ln -s ../../xrsh-apps/com . +$ git clone --recurse-submodules https://forgejo.isvery.ninja/xrsh/xrsh +$ cd xrsh ``` -> now surf to xrsh/src/index.html +> Now serve the repo from a HTTPS webserver (for example run `./make dev`) -developers: run `./make dev` (spins up a [redbean.com](https://redbean.dev) https-server) -> NOTE: if you value optimization over prototype-ability, you can minify the code by running `cd src && npm install parcel && parcel index.html` diff --git a/make b/make index 37afcfb..b97f2c8 100755 --- a/make +++ b/make @@ -1,6 +1,7 @@ #!/bin/sh REDBEAN_VERSION=https://redbean.dev/redbean-2.2.com APP=xrsh +DIR=$(dirname $(readlink -f $0)) export PATH=$PATH:. silent(){ "$@" 1>/dev/null 2>/dev/null; } @@ -18,21 +19,17 @@ standalone(){ test -f ${APP}.com || install cd src set -x - zip -r ../${APP}.com * + zip -x "*.git*" -r ../${APP}.com * ls -lah ../${APP}.com } dev(){ - test -d xrsh-apps || git clone https://forgejo.isvery.ninja/xrsh/xrsh-apps - cd src - ln -s ../xrsh-apps/app . - ln -s ../xrsh-apps/com . - cd - + test -d src/xrsh-apps || git submodule update --init --recursive cd /tmp test -f redbean.com || wget "$REDBEAN_VERSION" -O redbean.com && chmod 755 redbean.com test -f cert.pem || openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem cd - - cd "$dir" + cd "$DIR" /tmp/redbean.com -c 0 -C /tmp/cert.pem -K /tmp/key.pem -D . "$@" } diff --git a/shell.nix b/shell.nix index de3734e..bbdbf1e 100644 --- a/shell.nix +++ b/shell.nix @@ -13,6 +13,7 @@ nodejs_20 cosmopolitan + zip ]; } diff --git a/src/app b/src/app new file mode 120000 index 0000000..95b04ef --- /dev/null +++ b/src/app @@ -0,0 +1 @@ +xrsh-apps/app \ No newline at end of file diff --git a/src/com b/src/com new file mode 120000 index 0000000..8f95b9a --- /dev/null +++ b/src/com @@ -0,0 +1 @@ +xrsh-apps/com \ No newline at end of file diff --git a/src/xrsh-apps b/src/xrsh-apps new file mode 160000 index 0000000..1832cd1 --- /dev/null +++ b/src/xrsh-apps @@ -0,0 +1 @@ +Subproject commit 1832cd18fe21fc21bfdefb6e5d8ac6e82c21a75f diff --git a/xrsh.com b/xrsh.com new file mode 100755 index 0000000..9f62416 Binary files /dev/null and b/xrsh.com differ