diff --git a/COPYING.MPACKAGE b/COPYING.MPACKAGE new file mode 100644 index 0000000..5576a4e --- /dev/null +++ b/COPYING.MPACKAGE @@ -0,0 +1,21 @@ +/*****************************************************************************/ +/* */ +/* mpackage: basic configuration and installation scripts */ +/* for a midipix-based distribution */ +/* */ +/* Copyright (C) 2018 Z. Gilboa */ +/* */ +/* This program is free software: you can redistribute it and/or modify */ +/* it under the terms of the GNU General Public License as published by */ +/* the Free Software Foundation, either version 2 of the License, or */ +/* (at your option) version 3 of the License. */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU General Public License for more details. */ +/* */ +/* You should have received a copy of the GNU General Public License */ +/* along with this program. If not, see . */ +/* */ +/*****************************************************************************/ diff --git a/README b/README new file mode 100644 index 0000000..eacb16b --- /dev/null +++ b/README @@ -0,0 +1,13 @@ +This repository contains the midipix distro skeleton, +providing files needed for the distro installation +from within a live environment, as well as the final +target distribution. + +common/*: files copied to both the live environment + and the final target distribution. + +distro/*: files copied to the final target + distribution only. + +once/*: files copied to the live environment + only. diff --git a/common/etc/hosts b/common/etc/hosts new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/common/etc/hosts diff --git a/common/etc/init.sh b/common/etc/init.sh new file mode 100755 index 0000000..8bcce7f --- /dev/null +++ b/common/etc/init.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +cd / + +export PATH=/local/sbin:/local/bin:/sbin:/bin +export HOME=/home/`whoami` + +if [ "$TERM" = xterm ]; then + export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' +else + export PS1='\n\w \$ ' +fi + +if [ -x /bin/dircolors ]; then + alias ls='ls --color=auto' + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' diff --git a/common/etc/nanorc b/common/etc/nanorc new file mode 100644 index 0000000..bf654dd --- /dev/null +++ b/common/etc/nanorc @@ -0,0 +1 @@ +include /share/nano/*.nanorc diff --git a/common/etc/passwd b/common/etc/passwd new file mode 100644 index 0000000..6ea10fa --- /dev/null +++ b/common/etc/passwd @@ -0,0 +1,2 @@ +root:x:0:0:root:/root:/bin/bash +midipix:x:1000:1000::/home/midipix:/bin/bash diff --git a/common/etc/resolv.conf b/common/etc/resolv.conf new file mode 100644 index 0000000..af9304d --- /dev/null +++ b/common/etc/resolv.conf @@ -0,0 +1,2 @@ +nameserver 208.67.222.222 +nameserver 208.67.220.220 diff --git a/common/home/midipix/.bashrc b/common/home/midipix/.bashrc new file mode 100644 index 0000000..54406e9 --- /dev/null +++ b/common/home/midipix/.bashrc @@ -0,0 +1,2 @@ +# proceed only in interactive mode +[[ "$-" != *i* ]] && return diff --git a/common/home/midipix/.inputrc b/common/home/midipix/.inputrc new file mode 100644 index 0000000..236bfdd --- /dev/null +++ b/common/home/midipix/.inputrc @@ -0,0 +1 @@ +set completion-ignore-case on diff --git a/distro/bash.cmd b/distro/bash.cmd new file mode 100755 index 0000000..e825e12 --- /dev/null +++ b/distro/bash.cmd @@ -0,0 +1,9 @@ +@echo off + +pushd "%~dp0" + +start bin\ntctty.exe --sysroot %cd% --exec /bin/mintty -d -h always --window max --exec /bin/bash --init-file /etc/init.sh -i + +popd + +exit diff --git a/once/bash.bat b/once/bash.bat new file mode 100755 index 0000000..0ac91d4 --- /dev/null +++ b/once/bash.bat @@ -0,0 +1,12 @@ +@echo off + +pushd "%~dp0" + +set shell_sysroot=%cd% +set SYSROOT=/dev/fs/c/midipix + +start bin\ntctty.exe --sysroot %shell_sysroot% --exec /bin/mintty -d -h always --window max --exec /bin/bash --init-file /etc/init.sh -i + +popd + +exit diff --git a/once/cmd.bat b/once/cmd.bat new file mode 100755 index 0000000..0cb50ab --- /dev/null +++ b/once/cmd.bat @@ -0,0 +1,7 @@ +@echo off + +pushd "%~dp0" + +cmd.exe /K midipix.bat + +popd diff --git a/once/custom.sh b/once/custom.sh new file mode 100755 index 0000000..c3d611a --- /dev/null +++ b/once/custom.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ -z "$SYSROOT" ]; then + echo '$SYSROOT is not set!' + exit 2 +fi + +if ! [ -d "$SYSROOT" ]; then + echo '$SYSROOT does not exist!' + exit 2 +fi + +mkdir -p "$SYSROOT"/tmp || exit 2 +chmod 0775 "$SYSROOT"/tmp || exit 2 + +if [ -f /vendor.sh ]; then + /vendor.sh +fi diff --git a/once/install.bat b/once/install.bat new file mode 100755 index 0000000..727b538 --- /dev/null +++ b/once/install.bat @@ -0,0 +1,22 @@ +@echo off + +pushd "%~dp0" + +set shell_sysroot=%cd% + +echo. +echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +echo this is the midipix installation script +echo SYSROOT currently set to %SYSROOT% +echo shell_sysroot set to %shell_sysroot% +echo press any key to continue with installation, or CTRL-C to abort +echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +echo. + +@pause + +start bin\ntctty.exe --sysroot %shell_sysroot% --exec /bin/mintty -d -h always --window max --exec /bin/bash install.sh + +popd + +exit diff --git a/once/install.sh b/once/install.sh new file mode 100755 index 0000000..e34580b --- /dev/null +++ b/once/install.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' +export HOME=/home/midipix + +if [ -z "$SYSROOT" ]; then + echo '$SYSROOT is not set!' + exit 2 +else + mkdir -p "$SYSROOT" || exit 2 +fi + +for tarball in /tarballs/*.tar.gz; do + echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + echo extracting files from $tarball + echo .................................................. + tar -xvf $tarball -C "$SYSROOT" || exit 2 + echo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + echo +done + +/custom.sh || exit 2 + +echo +echo +echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +echo Congrats! All tarballs were successfully extracted. +echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/once/midipix.bat b/once/midipix.bat new file mode 100755 index 0000000..8cdd031 --- /dev/null +++ b/once/midipix.bat @@ -0,0 +1,12 @@ +@echo off + +cls + +set SYSROOT=/dev/fs/c/midipix + +echo. +echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo SYSROOT set to %SYSROOT% +echo to install the midipix distro sysroot, invoke install.bat +echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +echo. diff --git a/once/update.sh b/once/update.sh new file mode 100755 index 0000000..b6f05f4 --- /dev/null +++ b/once/update.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' +export HOME=/home/midipix + +if [ -z "$SYSROOT" ]; then + echo '$SYSROOT is not set!' + exit 2 +else + mkdir -p "$SYSROOT" || exit 2 +fi + +for tarball in /updates/*.tar.gz; do + echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + echo extracting files from $tarball + echo .................................................. + tar -xvf $tarball -C "$SYSROOT" || exit 2 + echo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + echo +done + +/custom.sh || exit 2 + +echo +echo +echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +echo Congrats! All tarballs were successfully extracted. +echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!