From 1219f052b2d0a72084f501ce27a72ecda028f3de Mon Sep 17 00:00:00 2001 From: Natuworkguy <149914029+Natuworkguy@users.noreply.github.com> Date: Fri, 28 Jun 2024 22:57:37 -0400 Subject: [PATCH 1/5] Update nnos Urgent fix to NNOS. The program was inexecutable --- linux/nnos | 76 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/linux/nnos b/linux/nnos index 463f14c..fa6b1a6 100755 --- a/linux/nnos +++ b/linux/nnos @@ -1,36 +1,52 @@ #!/bin/bash + +# Check if the script is run as root +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root." + exit 1 +fi + mkdir -p /var/nnos/binarystorage/ -touch /var/nnos/binarystorage/installed > /dev/null/output -if ["$(cat /var/nnos/binarystorage/installed)" == "1"]; then -help() { -echo "Usage: nnos:" -echo "[--help]: Display help information for NNOS" -echo "[--restart]: Restart NNOS, or your machine if needed" -echo "By The Nathan Network, INC™. All rights reserved" -exit 1 -} -help() -case "$OPTION" in +touch /var/nnos/binarystorage/installed >> /var/log/syslog + +# Define the available options (e.g., --install, --restart, --shutdown) +OPTION="$1" # Get the first command-line argument + +if [ "$(cat /var/nnos/binarystorage/installed)" == "1" ]; then + help() { + echo "Usage: nnos:" + echo "[--help]: Display help information for NNOS" + echo "[--restart]: Restart NNOS, or your machine if needed" + echo "By The Nathan Network, INC™. All rights reserved" + exit 1 + } + + case "$OPTION" in --restart) - reboot - ;; - --shutdown) - poweroff - ;; + reboot + ;; + --shutdown) + poweroff + ;; --help) - help() - ;; - ?) - echo "Usage: nnos: " - exit 1 - ;; -esac + help + ;; + *) + echo "Usage: nnos: " + exit 1 + ;; + esac else -case "$OPTION" in - --install) - echo "1" > /var/nnos/binarystorage/installed - mv "$0" /usr/bin/ - echo 'To use NNOS, call the "$0" command anytime..' - ;; -esac + case "$OPTION" in + --install) + echo "1" > /var/nnos/binarystorage/installed + mv "$0" /usr/bin/ + echo 'To use NNOS, call the "$0" command anytime..' + ;; + *) + echo "Usage: nnos: " + exit 1 + ;; + esac fi + From 01a8c04af19008b9c65d7b8eedff41c90876b83b Mon Sep 17 00:00:00 2001 From: Natuworkguy <149914029+Natuworkguy@users.noreply.github.com> Date: Fri, 28 Jun 2024 23:00:48 -0400 Subject: [PATCH 2/5] Update nnos Minor typo changes --- linux/nnos | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/linux/nnos b/linux/nnos index fa6b1a6..2b1360a 100755 --- a/linux/nnos +++ b/linux/nnos @@ -1,6 +1,5 @@ #!/bin/bash -# Check if the script is run as root if [[ $EUID -ne 0 ]]; then echo "This script must be run as root." exit 1 @@ -9,8 +8,7 @@ fi mkdir -p /var/nnos/binarystorage/ touch /var/nnos/binarystorage/installed >> /var/log/syslog -# Define the available options (e.g., --install, --restart, --shutdown) -OPTION="$1" # Get the first command-line argument +OPTION="$1" if [ "$(cat /var/nnos/binarystorage/installed)" == "1" ]; then help() { @@ -32,7 +30,7 @@ if [ "$(cat /var/nnos/binarystorage/installed)" == "1" ]; then help ;; *) - echo "Usage: nnos: " + echo "usage: nnos: " exit 1 ;; esac From e33244cfdb046bde80c729b1cfe98d780d47f94b Mon Sep 17 00:00:00 2001 From: Natuworkguy <149914029+Natuworkguy@users.noreply.github.com> Date: Fri, 28 Jun 2024 23:25:40 -0400 Subject: [PATCH 3/5] Create README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e196726 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# NNOS: Making Linux Easier (Also Works on Windows) + +## Overview + +Welcome to **NNOS**, your friendly companion for navigating the world of Linux (and yes, it plays well with Windows too!). Whether you're a seasoned command-line guru or just dipping your toes into the terminal waters, **NNOS** is here to make your life easier. + +## Key Features + +1. **Speak Your Mind (Coming Soon)**: Tired of typing? Just say it! **NNOS** understands natural language commands, so go ahead and tell it what you need. Whether it's opening a directory or installing a package, your voice is your superpower. + +2. **Package Magic**: Installing software shouldn't feel like deciphering ancient scrolls. With **NNOS**, package management becomes a breeze. Say goodbye to cryptic commands; just ask for what you want, and watch the magic happen. + +3. **Windows, Meet NNOS**: Windows users, fear not! **NNOS** isn't an exclusive Linux club. It's the bridge between worlds. So whether you're in the penguin-loving camp or the Windows fan club, we've got you covered. + +4. **Learn as You Go (Coming Soon)**: Curious about a command? Just ask! **NNOS** provides helpful explanations, examples, and even a dash of humor. Learning Linux has never been this friendly. +5. ** Everyday comands **: Common commands made easier (making the reboot command nnos restart) +## Installation + +Ready to join the conversation? Here's how to install **NNOS**: + +1. Open your terminal (or PowerShell on Windows). +2. Download NNOS an make sure you are in the same directory as the file +3. Type the following command: +chmod +x nnos;./nnos +4. Once installed, say hello to **NNOS**: + + ```bash + nnos --help + ``` + +## Contributing + +Got ideas? Found a bug? Want to share a Linux meme? Head over to our [GitHub repository](https://github.com/natuworkguy/NNOS) and join the party. We're all ears (and voices)! From 1270bf3e8f13f4eff714eb11b64fff5231872907 Mon Sep 17 00:00:00 2001 From: Natuworkguy <149914029+Natuworkguy@users.noreply.github.com> Date: Sat, 29 Jun 2024 10:21:14 -0400 Subject: [PATCH 4/5] Update run.bat Minor indentation and error changes --- win/run.bat | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/win/run.bat b/win/run.bat index 8b33bf7..3619c2e 100644 --- a/win/run.bat +++ b/win/run.bat @@ -1,26 +1,29 @@ #!/bin/bash + help() { -echo "Usage: nnos:" -echo "[--help]: Display help information for NNOS" -echo "[--restart]: Restart NNOS, or your machine if needed" -echo "By The Nathan Network, INC™. All rights reserved" -exit 1 + echo "Usage: nnos:" + echo "[--help]: Display help information for NNOS" + echo "[--restart]: Restart NNOS, or your machine if needed" + echo "By The Nathan Network, INC™. All rights reserved" + exit 1 } + hx() { -echo "Usage: nnos: " + echo "Usage: nnos: " } +hx() case "$OPTION" in - --restart) - reboot - ;; - --shutdown) - poweroff - ;; - --help) - help() - ;; - ?) - hx + --restart) + reboot + ;; + --shutdown) + poweroff + ;; + --help) + help + ;; + ?) + echo "Invalid option. Usage: nnos: " exit 1 ;; esac From f7f0032677917b40c1a9f146ba2bc89d838e3800 Mon Sep 17 00:00:00 2001 From: Natuworkguy <149914029+Natuworkguy@users.noreply.github.com> Date: Sat, 29 Jun 2024 10:27:16 -0400 Subject: [PATCH 5/5] Update nnos --- linux/nnos | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/linux/nnos b/linux/nnos index 2b1360a..fa6bc14 100755 --- a/linux/nnos +++ b/linux/nnos @@ -30,7 +30,7 @@ if [ "$(cat /var/nnos/binarystorage/installed)" == "1" ]; then help ;; *) - echo "usage: nnos: " + echo "Usage: nnos: " exit 1 ;; esac @@ -39,7 +39,7 @@ else --install) echo "1" > /var/nnos/binarystorage/installed mv "$0" /usr/bin/ - echo 'To use NNOS, call the "$0" command anytime..' + echo "To use NNOS, call the $(basename $0) command anytime." ;; *) echo "Usage: nnos: " @@ -47,4 +47,3 @@ else ;; esac fi -