#!/bin/bash

if [ "$USER_MENU" = "1" ]; then
 OUTPUTDIR=$HOME/.icewm
else
 OUTPUTDIR=/usr/share/icewm/
fi

if [ "$VERBOSE" = "1" ]; then
 echo "writing to $OUTPUTDIR/menu"
/usr/bin/xdg_menu --verbose --format icewm > $OUTPUTDIR/menu 
else
/usr/bin/xdg_menu --format icewm > $OUTPUTDIR/menu 2> /dev/null
fi
