aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..1dd889f
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+export source=$(pwd)
+
+sudo useradd -m melvix
+sudo mkdir -p /home/melvix/os
+sudo cp -r boot etc /home/melvix/os
+sudo chown -R melvix /home/melvix
+sudo cp bootstrap.sh /home/melvix
+sudo -i -u melvix bash bootstrap.sh ${source}
+
+export MELVIX=/home/melvix/os
+find ${MELVIX}-copy/{,usr/}{bin,lib,sbin} -type f -exec sudo strip --strip-debug '{}' ';'
+find ${MELVIX}-copy/{,usr/}lib64 -type f -exec sudo strip --strip-debug '{}' ';'
+sudo chown -R root:root ${MELVIX}-copy
+sudo chgrp 13 ${MELVIX}-copy/var/run/utmp ${MELVIX}-copy/var/log/lastlog
+sudo mknod -m 0666 ${MELVIX}-copy/dev/null c 1 3
+sudo mknod -m 0600 ${MELVIX}-copy/dev/console c 5 1
+sudo chmod 4755 ${MELVIX}-copy/bin/busybox
+
+cd ${MELVIX}-copy/
+sudo tar cfJ ../melvix-build.tar.xz * \ No newline at end of file