9 # Convert rel to abs path
16 DIR=`mktemp -d /tmp/vivym.XXXXXX`
22 if ! [ -e $DIR/$BASE.xml ] ; then
23 # echo "Map is renamed, setting BASE=$BASE"
24 BASE=$(ls -1 $DIR/*.xml)
35 IMGCOUNT=$(ls $DIR/images |wc -l)
36 SLIDECOUNT=$(grep "<slide" $DIR/$BASE.xml | wc -l)
37 #echo "Found $IMGCOUNT images."
38 #echo "Found $SLIDECOUNT slides."
41 # Create backup for comparison after edit
42 BAK=$DIR/$BASE.xml.bak
43 cp $DIR/$BASE.xml $BAK
46 $EDITOR $DIR/$BASE.xml
49 if cmp $DIR/$BASE.xml $DIR/$BASE.xml.bak &> /dev/null ; then
50 echo "Map not changed."