summaryrefslogtreecommitdiff
path: root/sysroot/bin
diff options
context:
space:
mode:
Diffstat (limited to 'sysroot/bin')
-rw-r--r--sysroot/bin/sh/fib10
-rw-r--r--sysroot/bin/sh/halt2
-rw-r--r--sysroot/bin/sh/mkuser7
3 files changed, 19 insertions, 0 deletions
diff --git a/sysroot/bin/sh/fib b/sysroot/bin/sh/fib
new file mode 100644
index 0000000..6d84b1b
--- /dev/null
+++ b/sysroot/bin/sh/fib
@@ -0,0 +1,10 @@
+#!/bin/lua
+
+function fib(n)
+ if n <= 1 then return 1 end
+ return fib(n-1) + fib(n-2)
+end
+
+for i=1,13 do
+ print("fib("..i..")\t= " .. fib(i))
+end
diff --git a/sysroot/bin/sh/halt b/sysroot/bin/sh/halt
new file mode 100644
index 0000000..563aded
--- /dev/null
+++ b/sysroot/bin/sh/halt
@@ -0,0 +1,2 @@
+#!/bin/shell
+echo halt > /initctl \ No newline at end of file
diff --git a/sysroot/bin/sh/mkuser b/sysroot/bin/sh/mkuser
new file mode 100644
index 0000000..a1544c6
--- /dev/null
+++ b/sysroot/bin/sh/mkuser
@@ -0,0 +1,7 @@
+#!/bin/shell
+touch /Users/user/
+cd /Users/user/
+touch private/
+echo secrets! > private/secret.txt
+touch public/
+echo no secrets here > public/hi.txt \ No newline at end of file