File: rgedit

package info (click to toggle)
rosegarden4 1.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 22,344 kB
  • ctags: 14,022
  • sloc: cpp: 131,139; sh: 9,429; perl: 2,620; xml: 2,231; makefile: 607; python: 374; ansic: 339; ruby: 173; php: 2
file content (22 lines) | stat: -rwxr-xr-x 406 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#
# rgedit - handy dandy RG file editor
#
# D. Michael McIntyre <dmmcintyr@users.sourceforge.net>
#

if (file $1|grep gzip); then
    echo Uncompressing $1 for editing...
    gunzip -c $1 > /tmp/$1.xml
    editor /tmp/$1.xml
    holder=$PWD
    cd /tmp
    gzip $1.xml
    cd $holder
    mv -f /tmp/$1.xml.gz $1 > /dev/null
    echo Wrote edited file to $1
else
    /usr/bin/less $1
fi
exit 0