diff --git a/bin/menu b/bin/menu index fe480dc..4262640 100644 --- a/bin/menu +++ b/bin/menu @@ -1,24 +1,28 @@ #!/usr/bin/env bash menu () { + rootDir="./modules" + currentDir="./modules" + previousDir="./modules" while [ active=1 ]; do title - echo "Please select a Entry" + echo "Current Dir: $" + echo "Please select and Entry" echo "" shopt -s nullglob - moduleCat=(./modules/*) + lsModDir="$currentDir*" + moduleEnt=($lsModDir) x=0 for entry in "${moduleEnt[@]}"; do - if [[ -d $entry ]]; then echo "$x:d - $entry" - else [[ -f $entry ]]; then echo "$x:f - $entry" + if [ -d $entry ]; then echo "$x:d - $entry" + elif [ -f $entry ]; then echo "$x:m - $entry" fi x=$((x+1)) done echo "exit" read opt exitchk - entSelect=`echo ${moduleEnt[$opt]} | sed 's|./modules/|../|'` - submenu + entSelect=`echo ${moduleEnt[$opt]} | sed 's|\$previousDir|..|'` clear done } diff --git a/bin/title b/bin/title index afe412e..1789b05 100644 --- a/bin/title +++ b/bin/title @@ -10,9 +10,11 @@ IFS='' read -r -d '' VAR <<-'EOF' \ | \__. | | \__/ || \__., | | | | _| |_.' / | | | | | \__/ | / \ '.__.' | ;.__/ '.__.'[___||__]|______.' [___][___] '.__.;__] / \ [__| / +\ 2.0 / ////////////////////////////////////////////////////////////////////////////// - Version 1.0 - A Bash Script For Downloading Open Directories Using Wget + Version 2.0 + Totally Modular Dude! + A modular bash script for downloading shit Written by HMSheets -------------------------------------------------------------------------------