File: linuxcncmkdesktop.in

package info (click to toggle)
linuxcnc 1%3A2.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 285,604 kB
  • sloc: python: 202,568; ansic: 109,036; cpp: 99,239; tcl: 16,054; xml: 10,631; sh: 10,303; makefile: 1,255; javascript: 138; sql: 72; asm: 15
file content (35 lines) | stat: -rw-r--r-- 530 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# file types supported: .ini, .demo

EMC_BIN_DIR=@EMC2_BIN_DIR@
EMC_SCRIPT_DIR=@EMC2_HOME@/scripts
if [ -x $EMC_BIN_DIR/linuxcnc ]; then
    EMC=$EMC_BIN_DIR/linuxcnc
else
    EMC=$EMC_SCRIPT_DIR/linuxcnc
fi

filename="$1"
name="$2"
comment="$3"

case ${filename##*.} in
  ini) cat <<EOF
[Desktop Entry]
Name=$name
Exec=$EMC '$filename'
Type=Application
Comment=$comment
Icon=linuxcncicon
EOF
;;
  demo) cat <<EOF
[Desktop Entry]
Name=$name
Exec=$filename
Type=Application
Comment=$comment
Icon=linuxcncicon
EOF
;;
esac