diff --git a/bash_update.sh b/bash_update.sh index 44c6f74..4bc10ae 100644 --- a/bash_update.sh +++ b/bash_update.sh @@ -15,10 +15,8 @@ if [ -e ~/.shellnotes/ver/.shellnotes_version ]; then NEW_VER=$(curl -s https://raw.githubusercontent.com/dmarakom6/shellnotes/master/ver/.shellnotes_version) else echo "Shellnotes is not installed. Try running 'sh install.sh'." - cd ~/.shellnotes/util/failed - g++ ufailed.cpp -o ufailed - ~/.shellnotes/util/failed/ufailed - rm -f ufailed + cd ~/.shellnotes/util/exec + ./ufailed cd $dir return 0 fi @@ -122,10 +120,8 @@ else echo -ne ">>>>>>>>>>>>>>>>>>>>$LGREEN[done]$NC " else echo -ne ">>>>>>>>>>>>>>>>>>>>$RED[failed]$NC " - cd ~/.shellnotes/util/failed - g++ ufailed.cpp -o ufailed - ~/.shellnotes/util/failed/ufailed - rm -f ufailed + cd ~/.shellnotes/util/exec + ./ufailed return 0 fi echo -ne '\n' diff --git a/docs/github/README.md b/docs/github/README.md index 003a8a4..c56e318 100644 --- a/docs/github/README.md +++ b/docs/github/README.md @@ -3,8 +3,8 @@ A easy, simple and fast way to keep notes via your linux terminal. # What is shellnotes? -Shellnotes is a note system for advanced linux and terminal users. It is made out of a lot of other commands and scripts, and has tons of abilities, like a logging system, an auto-update feature, and much more! -Shellnotes uses your favourite text editor to save notes on the go. If you are the type of guy that has his terminal open 24/7, you can also save notes __directly__ via terminal! +Shellnotes is a note system for advanced linux and terminal users. It is made out of commands and scripts, and has tons of abilities. +Shellnotes uses your favourite text editor to save notes on-the-go. If you are the type of guy that has his terminal open 24/7, you can also save notes __directly__ via terminal! With shellnotes, you can make, find, list, edit or delete your notes from wherever you are, whenever you want. # Why use shellnotes? @@ -13,13 +13,13 @@ With shellnotes, you can make, find, list, edit or delete your notes from wherev * It can suit both dynamic and regular users, as it brings a classic TUI experience as well as some more modern abilities. * It runs __exclusively__ in your terminal, its source files are stored in your home folder. * It's lightweight -* It's [more than just a program for taking notes.](#learn-everything-shellnotes-can-do). It has a ton of other interesting abilities. +* It's [more than just a program for taking notes](#learn-everything-shellnotes-can-do). It has a ton of other interesting abilities. * It's portable and compatible with most shells. -* It matches all the users' experience, by creating the appropriate environment for both beginners and advanced users linux users. +* It matches all users, by creating the appropriate environment for both beginners and advanced linux users. * Even if you delete shellnotes, your notes will stay where they are. * It has a simple file organization system and [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface). * It's easy to install, delete, update or use. -* It's mostly written in [shell](https://en.wikipedia.org/wiki/Shell_script), which is the language for Unix/Linux [CLI](https://en.wikipedia.org/wiki/Command-line_interface) applications. +* It's mostly written in [shell](https://en.wikipedia.org/wiki/Shell_script), which is the language for Unix/Linux [CLI](https://en.wikipedia.org/wiki/Command-line_interface) in-terminal applications. # How to install After downloading the source code, navigate to the folder where it's stored, and execute the install script (`install.sh`), using the `sh` command. @@ -120,4 +120,4 @@ Want even more information? Feel free to see the whole [shellnotes documentation *WARNING*: The default shell for shellnotes is bash. However, shellnotes will find your shell if it's different and continue installing according to it. If your shell is not supported though, the installation will fail. -*WARNING*: install.sh must be run from the folder where it was downloaded WITH the other files from the repo. Otherwise, installation will fail. (see [installation documentation](https://github.com/dmarakom6/shellnotes/blob/master/docs/installing.txt) for more). \ No newline at end of file +*WARNING*: install.sh must be run from the folder where it was downloaded WITH the other files from the repo. Otherwise, installation will fail. (see [installation documentation](https://github.com/dmarakom6/shellnotes/blob/master/docs/installing.txt) for more). diff --git a/install.sh b/install.sh index 4850f8a..955c449 100644 --- a/install.sh +++ b/install.sh @@ -11,11 +11,9 @@ VER_TO_INSTALL=3.0 #This is used when updating, it will be changed in every new if [ -e ~/.shellnotes/.shellnotes.sh ]; then echo "Shellnotes is already installed." echo "If you want to update, please run 'update.sh'." - cd ~/.shellnotes/util/failed - g++ ifailed.cpp -o ifailed - ~/.shellnotes/util/failed/ifailed - rm -f ifailed - cd $dir + cd ~/.shellnotes/util/exec + ./ifailed + else mkdir ~/.shellnotes mv docs ~/.shellnotes/ @@ -41,7 +39,8 @@ else sudo apt install python3-pip pip install pathlib sudo apt update - chmod +x ~/.shellnotes.sh + sudo chmod a+rwx ~/.shellnotes/util/exec/* + sudo chmod +x ~/.shellnotes/.shellnotes.sh echo "$VER_TO_INSTALL" > ~/.shellnotes/ver/.shellnotes_version @@ -89,10 +88,8 @@ else clear echo "Your shell is not supported by shellnotes." echo "Installation Failed." - cd ~/.shellnotes/util/failed - g++ ifailed.cpp -o ifailed - ~/.shellnotes/util/failed/ifailed - rm -f ifailed + cd ~/.shellnotes/util/exec + ./ifailed cd $dir fi fi diff --git a/set_defaults.sh b/set_defaults.sh index d0f5a0f..c696ab3 100644 --- a/set_defaults.sh +++ b/set_defaults.sh @@ -37,10 +37,8 @@ if [[ "$input" == "1" ]]; then else echo "This program name is invalid or not a text editor." - cd ~/.shellnotes/util/failed - g++ sdfailed.cpp -o sdfailed - ~/.shellnotes/util/failed/sdfailed - rm -f sdfailed + cd ~/.shellnotes/util/exec + ./sdfailed fi @@ -56,10 +54,8 @@ elif [[ "$input" == "2" ]]; then echo "Please restart your terminal." fi echo "This program name is invalid or not a text editor." - cd ~/.shellnotes/util/failed - g++ sdfailed.cpp -o sdfailed - ~/.shellnotes/util/failed/sdfailed - rm -f sdfailed + cd ~/.shellnotes/util/exec + ./sdfailed fi @@ -71,6 +67,8 @@ elif [[ "$input" == "3" ]]; then if [ -d $name ]; then if [[ "$name" == "$input3" ]]; then echo "This is already the default notes folder." + cd ~/.shellnotes/util/exec + ./sdfailed else mv $DEFAULT_PATH/* $name echo "$name" > ~/.shellnotes/util/sd/sd-input3.txt @@ -80,10 +78,8 @@ elif [[ "$input" == "3" ]]; then else echo "This directory does not exist." - cd ~/.shellnotes/util/failed - g++ sdfailed.cpp -o sdfailed - ~/.shellnotes/util/failed/sdfailed - rm -f sdfailed + cd ~/.shellnotes/util/exec + ./sdfailed fi diff --git a/uninstall.sh b/uninstall.sh index c874466..24e2eb3 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -70,31 +70,25 @@ if [ $option = "1" ]; then fi else echo "Your shell is not supported." - cd ~/.shellnotes/util/failed - g++ uninfailed.cpp -o uninfailed - ~/.shellnotes/util/failed/uninfailed - rm -f uninfailed + cd ~/.shellnotes/util/exec + ./uninfailed cd $dir fi esac else echo "An error occured." echo "Shellnotes is not installed." - cd ~/.shellnotes/util/failed - g++ uninfailed.cpp -o uninfailed - ~/.shellnotes/util/failed/uninfailed - rm -f uninfailed - cd $dir + cd ~/.shellnotes/util/exec + ./uninfailed + cd $dir fi elif [ $option = "2" ]; then if grep 'return' <~/.shellnotes/.shellnotes.sh >/dev/null; then echo "Shellnotes is already disabled." - cd ~/.shellnotes/util/failed - g++ disfailed.cpp -o disfailed - ~/.shellnotes/util/failed/disfailed - rm -f disfailed + cd ~/.shellnotes/util/exec + ./disfailed cd $dir else sed -i '2 i\return 0 #Shellnotes is disabled by the user. Do not change this line.' ~/.shellnotes/.shellnotes.sh @@ -106,10 +100,8 @@ elif [ $option = "3" ]; then echo "Shellnotes is now enabled. Please restart your terminal." else echo "Shellnotes is already enabled." - cd ~/.shellnotes/util/failed - g++ enfailed.cpp -o enfailed - ~/.shellnotes/util/failed/enfailed - rm -f enfailed + cd ~/.shellnotes/util/exec + ./enfailed cd $dir fi else diff --git a/update.sh b/update.sh index 2ddcef7..daa784f 100644 --- a/update.sh +++ b/update.sh @@ -13,10 +13,8 @@ if [ -e ~/.shellnotes/ver/.shellnotes_version ]; then NEW_VER=$(curl -s https://raw.githubusercontent.com/dmarakom6/shellnotes/master/ver/.shellnotes_version) else echo "Shellnotes is not installed. Try running 'sh install.sh'." - cd ~/.shellnotes/util/failed - g++ ufailed.cpp -o ufailed - ~/.shellnotes/util/failed/ufailed - rm -f ufailed + cd ~/.shellnotes/util/exec + ./ufailed return 0 fi clear @@ -25,10 +23,8 @@ dir="$(pwd)" if [ "$VER" = "$NEW_VER" ]; then echo "No new update found." echo "Shellnotes is up to date (version $VER)." - cd ~/.shellnotes/util/failed - g++ ufailed.cpp -o ufailed - ~/.shellnotes/util/failed/ufailed - rm -f ufailed + cd ~/.shellnotes/util/exec + ./ufailed cd $dir else echo "Good news!" @@ -46,10 +42,8 @@ else else sleep 0.5 echo "Update Failed." - cd ~/.shellnotes/util/failed - g++ ufailed.cpp -o ufailed - ~/.shellnotes/util/failed/ufailed - rm -f ufailed + cd ~/.shellnotes/util/exec + ./ufailed cd $dir return 0 fi diff --git a/util/exec/disfailed b/util/exec/disfailed new file mode 100644 index 0000000..7cea8b7 Binary files /dev/null and b/util/exec/disfailed differ diff --git a/util/exec/enfailed b/util/exec/enfailed new file mode 100644 index 0000000..a4e4e8c Binary files /dev/null and b/util/exec/enfailed differ diff --git a/util/exec/ifailed b/util/exec/ifailed new file mode 100644 index 0000000..1fb028c Binary files /dev/null and b/util/exec/ifailed differ diff --git a/util/exec/sdfailed b/util/exec/sdfailed new file mode 100644 index 0000000..25624ae Binary files /dev/null and b/util/exec/sdfailed differ diff --git a/util/exec/ufailed b/util/exec/ufailed new file mode 100644 index 0000000..e99b42b Binary files /dev/null and b/util/exec/ufailed differ diff --git a/util/exec/uninfailed b/util/exec/uninfailed new file mode 100644 index 0000000..729cd55 Binary files /dev/null and b/util/exec/uninfailed differ