diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-29 17:38:14 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-29 17:38:14 -0400 |
commit | db536f42f30514112944892f209520a2ac5a65c2 (patch) | |
tree | dd1528c5e22f655889eefba9d249bc75bffc755f | |
parent | Add a new type of menu plugin: jsonmenu (diff) | |
download | lumina-db536f42f30514112944892f209520a2ac5a65c2.tar.gz lumina-db536f42f30514112944892f209520a2ac5a65c2.tar.bz2 lumina-db536f42f30514112944892f209520a2ac5a65c2.zip |
Create a directory for placing sample JSON menu generation scripts, and add one (incomplete yet) for listing the contents of the current directory (home dir ususally)
-rwxr-xr-x | JsonMenu_Scripts/ls.json.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/JsonMenu_Scripts/ls.json.sh b/JsonMenu_Scripts/ls.json.sh new file mode 100755 index 00000000..9a6ab847 --- /dev/null +++ b/JsonMenu_Scripts/ls.json.sh @@ -0,0 +1,10 @@ +#!/bin/sh +cmd="ls $1" +OUT="" +for name in `${cmd}`; do + if [ "${OUT}" != "" ] ; then + OUT="${OUT}," + fi + OUT="${OUT} \"${name}\" : { \"type\" : \"item\", \"action\" : \"${name}\"}" +done +echo "{ ${OUT} }" |