/ scripts / linuxcncmkdesktop.in
linuxcncmkdesktop.in
 1  #!/bin/sh
 2  # file types supported: .ini, .demo
 3  
 4  EMC_BIN_DIR=@EMC2_BIN_DIR@
 5  EMC_SCRIPT_DIR=@EMC2_HOME@/scripts
 6  if [ -x $EMC_BIN_DIR/linuxcnc ]; then
 7      EMC=$EMC_BIN_DIR/linuxcnc
 8  else
 9      EMC=$EMC_SCRIPT_DIR/linuxcnc
10  fi
11  
12  filename="$1"
13  name="$2"
14  comment="$3"
15  
16  case ${filename##*.} in
17    ini) cat <<EOF
18  [Desktop Entry]
19  Name=$name
20  Exec=$EMC '$filename'
21  Type=Application
22  Comment=$comment
23  Icon=linuxcncicon
24  EOF
25  ;;
26    demo) cat <<EOF
27  [Desktop Entry]
28  Name=$name
29  Exec=$filename
30  Type=Application
31  Comment=$comment
32  Icon=linuxcncicon
33  EOF
34  ;;
35  esac