#!/bin/bash
# Konqueror service menu script to create module
# Author: Brokenman <brokenman@porteus.org>

path=${1}
name=${2}

if [ -f $path/$name.xzm ]; then
   targ=$path/$name-1.xzm
      else
   targ=$path/$name.xzm
fi

kdialog --passivepopup "Creating $path/$name now. Please wait ..... " 3
dir2xzm $path/$name $targ && kdialog --msgbox "Module created as $path/$name" || kdialog --msgbox "Module creation failed!"