From ad5e17b2a6f892f730f833242ae7cb0a25af48f1 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sun, 22 Dec 2024 01:04:28 -0600 Subject: [PATCH] Updating notes --- src/Shell/chroot-manager.sh | 33 ++++++++++++++++--- ... Quick.sh => nes-roms-on-android-quick.sh} | 0 src/TXTs/Make Tiniest Chroot Ever.txt | 15 +++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) rename src/Shell/{NES ROMs on Android Quick.sh => nes-roms-on-android-quick.sh} (100%) create mode 100644 src/TXTs/Make Tiniest Chroot Ever.txt diff --git a/src/Shell/chroot-manager.sh b/src/Shell/chroot-manager.sh index cd97a92..f2989df 100755 --- a/src/Shell/chroot-manager.sh +++ b/src/Shell/chroot-manager.sh @@ -50,13 +50,22 @@ function _get_x_port() { function _get_chroot_env() { if [ ! -z "${1}" -a "${1}" != " " ]; then chroot_env="${1}" - else + else chroot_env=$(_prompt_chroot_env "${2}") fi echo "${chroot_env}" } +function _get_input_apps_list() { + read -p "To Install: " apps + if [ ! -z "${apps}" -a "${apps}" != " " ]; then + echo "${apps}" + else + exit 1 + fi +} + function _install_software() { chroot_env=$(_get_chroot_env "${1}" "Install Base Software To Chroot Venv:") @@ -69,6 +78,7 @@ function _install_software() { x11-xserver-utils \ locales \ sudo \ + moreutils \ less \ nano \ wget \ @@ -197,6 +207,7 @@ function install_desktop_software() { engrampa \ terminator \ mousepad \ + sqlitebrowser \ ghex \ galculator \ gpick @@ -272,6 +283,20 @@ EOF _unbind_mounts "${chroot_env}" } +function install_custom_software() { + clear + chroot_env=$(_get_chroot_env "${1}" "Install Custom Software To Chroot Venv:") + apps=$(_get_input_apps_list) + + _bind_mounts "${chroot_env}" + + sudo chroot "${chroot_env}" /usr/bin/apt-get install \ + --no-install-recommends \ + --no-install-suggests -y \ + "${apps}" + + _unbind_mounts "${chroot_env}" +} function _get_chroot_system_type() { PS3="Enter system type: " @@ -289,7 +314,7 @@ function _get_chroot_system_type() { echo "${system_type}" break ;; - *) + *) ;; esac done @@ -315,7 +340,7 @@ function _get_chroot_variant() { echo "${variant}" break ;; - *) + *) ;; esac done @@ -565,4 +590,4 @@ if [[ -z "${name}" ]]; then _menu else $f_call "$@" -fi +fi \ No newline at end of file diff --git a/src/Shell/NES ROMs on Android Quick.sh b/src/Shell/nes-roms-on-android-quick.sh similarity index 100% rename from src/Shell/NES ROMs on Android Quick.sh rename to src/Shell/nes-roms-on-android-quick.sh diff --git a/src/TXTs/Make Tiniest Chroot Ever.txt b/src/TXTs/Make Tiniest Chroot Ever.txt new file mode 100644 index 0000000..0eeb4dc --- /dev/null +++ b/src/TXTs/Make Tiniest Chroot Ever.txt @@ -0,0 +1,15 @@ +Make the directory our chroot would be in and the bin folder. + + mkdir -p MyChroot/bin + +Now, we need to download a shell. (For this example, use Ash from Busybox 1.26.) + + wget https://busybox.net/downloads/binaries/1.26.2-i686/busybox_ASH -O MyChroot/bin/ash + +Next, make the binary executable. + + chmod +x MyChroot/bin/ash + +To run chroot do; + +chroot path/to/