File: fidget-widget

package info (click to toggle)
xemacs20 20.4-13
  • links: PTS
  • area: main
  • in suites: slink
  • size: 67,324 kB
  • ctags: 57,643
  • sloc: lisp: 586,197; ansic: 184,662; sh: 4,296; asm: 3,179; makefile: 2,021; perl: 1,059; csh: 96; sed: 22
file content (22 lines) | stat: -rwxr-xr-x 570 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
#!/bin/sh
#  fidget-widget modifies the output of XDesigner.
#  the creation function returns widget1 and does not create the parent.
#  marc + matthieu

NAME=$2
FILE=$1
case $FILE in
  *ctreebr_ps.xdc|*classbr_ps.xdc|*leb_psheet.xdc) filter="grep -v Offset" ;;
  *) filter=cat ;;
esac
sed "
    /^\*\* Generated by / a\\
	** Modified by fidget-widget, `date +%d-%h-%y`
    /Widget widget0/d
    /^create_widget0/s//Widget $NAME/
    /int h_spacing/s//short h_spacing/
    /widget0 =/d
    /widget1 =/s/widget0/parent/
    /^}/i\\
	return widget1;
    " $FILE | $filter