File: dump.sh

package info (click to toggle)
gwyddion 2.67-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 54,152 kB
  • sloc: ansic: 412,023; python: 7,885; sh: 5,492; makefile: 4,957; xml: 3,954; cpp: 2,107; pascal: 418; perl: 154; ruby: 130
file content (33 lines) | stat: -rw-r--r-- 685 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
#!/bin/sh
# $Id: dump.sh 22454 2019-08-31 19:53:40Z yeti-dn $
# An extremely simple Gwyddion plug-in example in shell.  Saves and loads
# the data exactly as got from plugin-proxy.
# Written by Yeti <yeti@gwyddion.net>.
# Public domain.
case "$1" in
    register)
    # Plug-in info.
    echo "dump"
    echo "Plug-in proxy format dump (.dump)"
    echo "*.dump"
    echo "load save"
    ;;

    load)
    dumpfile="$2"
    externfile="$3"
    cat "$externfile" >"$dumpfile"
    ;;

    save)
    dumpfile="$2"
    externfile="$3"
    cat "$dumpfile" >"$externfile"
    ;;

    *)
    echo "*** Error: plug-in has to be called from Gwyddion plugin-proxy." 1>&2
    exit 1
    ;;
esac