#!/bin/sh

# If your files are not text files you can edit the following lines.
# E.g. both TYPE and GNTYPE should be "9" for binary files.
# For a type '7wr' item, TYPE shoule be "0" and GNTYPE should be "range"

TYPE="0"
GNTYPE="0"
MENU="menu"      #Change this to change name of output file.

if [ $# -lt 2 ]
then
	echo
	echo "Usage: mkmenu current_dir file [file...]"
	echo "Current_dir is relative to the gn_root and starts with '/'"
	echo "Example: mkmenu /mydir/subir *.txt"
	echo
	exit 0
fi

DIR="$1"
shift

echo "#Menu file created by mkmenu" > $MENU
echo >> $MENU
for i in $*
do
	echo "Name="$i >> $MENU
	echo "Path="$GNTYPE$DIR"/"$i >> $MENU
	echo "Type="$TYPE >> $MENU
	echo >> $MENU
done