Cleaned up code by a lot. Smaller file size....
This commit is contained in:
parent
59fb8f8058
commit
d19ee08fb6
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
pre()
|
pre()
|
||||||
{
|
{
|
||||||
if [ -d /tmp/sysMENU/ ]; then
|
if [ -d /tmp/sysMENU/ ]; then
|
||||||
mainMENU;
|
mainMENU;
|
||||||
else
|
else
|
||||||
startScan;
|
startScan;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mainMENU()
|
mainMENU()
|
||||||
|
@ -102,7 +102,7 @@ menuHeaderInsert;
|
||||||
|
|
||||||
menuHeaderInsert()
|
menuHeaderInsert()
|
||||||
{
|
{
|
||||||
x=$(cat /tmp/sysMENU/menu.list | wc -l) >> /dev/null ; # Variable set to number of lines filled in list.txt
|
x=$(cat /tmp/sysMENU/menu.list | wc -l) >> /dev/null ;
|
||||||
i="1"
|
i="1"
|
||||||
|
|
||||||
while [ $i -le $x ]; do
|
while [ $i -le $x ]; do
|
||||||
|
@ -137,53 +137,15 @@ i="1"
|
||||||
elif [[ "$catagory" == *"$wine"* ]]; then
|
elif [[ "$catagory" == *"$wine"* ]]; then
|
||||||
echo "$inputer" >> /tmp/sysMENU/${wine}.sh
|
echo "$inputer" >> /tmp/sysMENU/${wine}.sh
|
||||||
fi
|
fi
|
||||||
i=$[$i++1];
|
i=$[$i++1];
|
||||||
done
|
done
|
||||||
endMenuInsert=$(echo "2>"\"'${INPUT}'"\"")
|
|
||||||
menuitmVar=$(echo 'menuitem=$(<"${INPUT}")')
|
echo "2>"\"'${INPUT}'"\"" | tee -a /tmp/sysMENU/*.sh
|
||||||
preCMD=$(echo "case \$menuitem in")
|
echo 'menuitem=$(<"${INPUT}")' | tee -a /tmp/sysMENU/*.sh
|
||||||
menuCall=$(echo "Main_Menu) bash /bin/shellMen ;;")
|
echo "case \$menuitem in" | tee -a /tmp/sysMENU/*.sh
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${accss}.sh
|
echo "Main_Menu) bash /bin/shellMen ;;" | tee -a /tmp/sysMENU/*.sh
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${accss}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${accss}.sh
|
commandInsert;
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${accss}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${dev}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${dev}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${dev}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${dev}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${gme}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${gme}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${gme}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${gme}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${int}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${int}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${int}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${int}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${graph}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${graph}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${graph}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${graph}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${offce}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${offce}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${offce}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${offce}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${media}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${media}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${media}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${media}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${sys}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${sys}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${sys}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${sys}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${settngs}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${settngs}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${settngs}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${settngs}.sh
|
|
||||||
echo "$endMenuInsert" >> /tmp/sysMENU/${wine}.sh
|
|
||||||
echo "$menuitmVar" >> /tmp/sysMENU/${wine}.sh
|
|
||||||
echo "$preCMD" >> /tmp/sysMENU/${wine}.sh
|
|
||||||
echo "$menuCall" >> /tmp/sysMENU/${wine}.sh
|
|
||||||
commandInsert;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
commandInsert()
|
commandInsert()
|
||||||
|
@ -197,7 +159,7 @@ i="1"
|
||||||
execMethod=$(grep -A 0 "Exec=" /usr/share/applications/"$line1")
|
execMethod=$(grep -A 0 "Exec=" /usr/share/applications/"$line1")
|
||||||
catagory=$(grep -A 0 "Categories=" /usr/share/applications/"$line1")
|
catagory=$(grep -A 0 "Categories=" /usr/share/applications/"$line1")
|
||||||
preComment=$(grep -A 0 "Comment=" /usr/share/applications/"$line1")
|
preComment=$(grep -A 0 "Comment=" /usr/share/applications/"$line1")
|
||||||
execCMD=$(echo "${filename}) exec ${filename} ;;")
|
execCMD=$(echo "${filename}) exec ${filename} & ;;")
|
||||||
if [[ "$catagory" == *"$accss"* ]] || [[ "$catagory" == *"$util"* ]]; then
|
if [[ "$catagory" == *"$accss"* ]] || [[ "$catagory" == *"$util"* ]]; then
|
||||||
echo "$execCMD" >> /tmp/sysMENU/${accss}.sh
|
echo "$execCMD" >> /tmp/sysMENU/${accss}.sh
|
||||||
elif [[ "$catagory" == *"$dev"* ]]; then
|
elif [[ "$catagory" == *"$dev"* ]]; then
|
||||||
|
@ -221,19 +183,10 @@ i="1"
|
||||||
elif [[ "$catagory" == *"$wine"* ]]; then
|
elif [[ "$catagory" == *"$wine"* ]]; then
|
||||||
echo "$execCMD" >> /tmp/sysMENU/${wine}.sh
|
echo "$execCMD" >> /tmp/sysMENU/${wine}.sh
|
||||||
fi
|
fi
|
||||||
i=$[$i++1];
|
i=$[$i++1];
|
||||||
done
|
done
|
||||||
echo "esac" >> /tmp/sysMENU/${accss}.sh
|
echo "esac" | tee -a /tmp/sysMENU/*.sh
|
||||||
echo "esac" >> /tmp/sysMENU/${dev}.sh
|
chmod +x /tmp/sysMENU/*.sh
|
||||||
echo "esac" >> /tmp/sysMENU/${gme}.sh
|
mainMENU;
|
||||||
echo "esac" >> /tmp/sysMENU/${int}.sh
|
|
||||||
echo "esac" >> /tmp/sysMENU/${graph}.sh
|
|
||||||
echo "esac" >> /tmp/sysMENU/${offce}.sh
|
|
||||||
echo "esac" >> /tmp/sysMENU/${media}.sh
|
|
||||||
echo "esac" >> /tmp/sysMENU/${sys}.sh
|
|
||||||
echo "esac" >> /tmp/sysMENU/${settngs}.sh
|
|
||||||
echo "esac" >> /tmp/sysMENU/${wine}.sh
|
|
||||||
chmod +x /tmp/sysMENU/*.sh
|
|
||||||
mainMENU;
|
|
||||||
}
|
}
|
||||||
pre;
|
pre;
|
||||||
|
|
Loading…
Reference in New Issue