|
|
@@ -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 |
|
|
|
} |
|
|
|