File: goarchive-scene

package info (click to toggle)
freewheeling 0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,564 kB
  • ctags: 2,681
  • sloc: cpp: 22,418; sh: 3,711; xml: 2,879; makefile: 78; ansic: 12
file content (22 lines) | stat: -rwxr-xr-x 1,048 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Aid for managing loop/scene libraries
#
# This script can be used in the FreeWheeling library folder (fw-lib/ by default)
# to archive -one scene plus all the loops it uses-
#
# This is useful for sharing scenes between people. You simply archive up the scene with the loops,
# send the archive to the person, and they extract it into their fw-lib/ folder. Then they can
# build on your improvisation.
#
# For example: goarchive-scene "scene-504B642155558670C0DD84717E4B4DF8-Hacking the Database 2.xml" hacking
#                archives the above named scene and all loops it refers to into the archive 'hacking.tar.bz2'
#
# No files are archived before prompting you.
#
echo Files to archive:

awk '{ if ($1 == "<loop") { sub(/hash="/,"",$3) ; sub(/"/,"",$3) ; print "loop-" $3 "*" } }' "$1"
echo "$1"
echo "Archive these files to $2.tar.bz2? (Enter=Yes, CTRL-C=Abort)"
read
SCENEFILE=`echo "$1" | cut -d- -f1,2`
tar cjvf $2.tar.bz2 `awk '{ if ($1 == "<loop") { sub(/hash="/,"",$3) ; sub(/"/,"",$3) ; print "loop-" $3 "*" } }' "$1"` $SCENEFILE*