Revision: 2182
Author: bmsleight
Date: 2006-03-29 12:53:47 -0800 (Wed, 29 Mar 2006)
ViewCVS: http://svn.sourceforge.net/morphix/?rev=2182&view=rev
Log Message:
-----------
added <remote> option. Minor changes to template. May I have a morphing-morphmini.deb please ? (catching alex's cia stats)
Modified Paths:
--------------
trunk/morph-scripts/morphmini/example.xml
trunk/morph-scripts/morphmini/morphimini
Modified: trunk/morph-scripts/morphmini/example.xml
===================================================================
--- trunk/morph-scripts/morphmini/example.xml 2006-03-29 19:31:06 UTC (rev 2181)
+++ trunk/morph-scripts/morphmini/example.xml 2006-03-29 20:53:47 UTC (rev 2182)
@@ -6,10 +6,15 @@
<minitag>Example</minitag>
<maintag>ALL</maintag>
<filelist> <!-- files to be added to minimod available as $1/morphix/files/ -->
- <file>/home/morph/test.jpg</file>
- <file>/home/morph/test2.jpg</file>
- <file>/home/morph/test3.jpg</file>
- <file>/home/morph/test4.jpg</file>
+ <local>
+ <file>/home/morph/test.jpg</file>
+ <file>/home/morph/test2.jpg</file>
+ <file>/home/morph/test3.jpg</file>
+ <file>/home/morph/test4.jpg</file>
+ </local>
+ <remote>
+ <file>http://www.barwap.com/morphix/mmorphix/morphixsound2.wav</file>
+ </remote>
</filelist>
<commandlist> <!-- Commands to be started from minimodule -->
<preX> <!-- Commands to run before X windows start -->
Modified: trunk/morph-scripts/morphmini/morphimini
===================================================================
--- trunk/morph-scripts/morphmini/morphimini 2006-03-29 19:31:06 UTC (rev 2181)
+++ trunk/morph-scripts/morphmini/morphimini 2006-03-29 20:53:47 UTC (rev 2182)
@@ -57,12 +57,18 @@
process_filelist ()
{
-xml_get_tmp //minimod filelist file $TEMPLATE
+xml_get_tmp //minimod/filelist local file $TEMPLATE
RETURN_VALUE=$(cat $TMP_FILE)
for CP_FILES in $RETURN_VALUE
do
cp -p $CP_FILES $TMP_DIR/minimod/morphix/files/
done
+xml_get_tmp //minimod/filelist remote file $TEMPLATE
+RETURN_VALUE=$(cat $TMP_FILE)
+for CP_FILES in $RETURN_VALUE
+do
+ wget --tries=3 --timeout=60 --directory-prefix=$TMP_DIR/minimod/morphix/files/ $CP_FILES
+done
}
process_command_prex ()
@@ -81,9 +87,8 @@
if [ -s $TMP_FILE ]
then
echo "#!/bin/sh " >$TMP_DIR/minimod/morphix/commandsX.sh
+ cat $TMP_FILE >>$TMP_DIR/minimod/morphix/commandsX.sh
chmod a+x $TMP_DIR/minimod/morphix/commandsX.sh
- #sed -e 's/^/\/bin\/sh /g' $TMP_FILE >>$TMP_DIR/minimod/morphix/commandsX.sh
- cat $TMP_FILE >>$TMP_DIR/minimod/morphix/commandsX.sh
DOLLAR="$"
DOLLARSTARTX=$DOLLAR"STARTX"
DOLLAR1=$DOLLAR"1"
@@ -91,7 +96,7 @@
cat >>$TMP_DIR/minimod/morphix/loadmod.sh <<EOF
USER=$DOLLAR(cat /etc/sysconfig/username)
(while [ -z $DOLLARSTARTX ]; do STARTX=$DOLLAR(ps -C x-session-manager -o pid=); sleep 1; done ; su -c "export DISPLAY=:0.0 ; \\
-/bin/bash $DOLLAR1/morphix/commandsX.sh \\
+$DOLLAR1/morphix/commandsX.sh $DOLLAR1 \\
" - $DOLLARUSER ) &
EOF
fi
@@ -102,13 +107,17 @@
xml_get_tmp //minimod/commandlist postX command $TEMPLATE
if [ -s $TMP_FILE ]
then
- echo "#!/bin/sh " >$TMP_DIR/minimod/morphix/S11PostX11.sh
- chmod a+x $TMP_DIR/minimod/morphix/S11PostX11.sh
- #sed -e 's/^/\/bin\/sh /g' $TMP_FILE >>$TMP_DIR/minimod/morphix/S11PostX11.sh
- cat $TMP_FILE >>$TMP_DIR/minimod/morphix/S11PostX11.sh
+ echo "#!/bin/sh " >$TMP_DIR/minimod/morphix/commandsPostX.sh
+ chmod a+x $TMP_DIR/minimod/morphix/commandsPostX.sh
+ cat $TMP_FILE >>$TMP_DIR/minimod/morphix/commandsPostX.sh
+
+ #Alex will hate this
+ #This will make sure that commandsPostX.sh has correct $1 from minimodule
DOLLAR="$"
DOLLAR1=$DOLLAR"1"
- echo "cp $DOLLAR1/morphix/S11PostX11.sh /morphix/rc.m/S11PostX11.sh " >>$TMP_DIR/minimod/morphix/loadmod.sh
+ echo "echo \"#!/bin/sh \" > /morphix/rc.m/S11PostX11.sh " >>$TMP_DIR/minimod/morphix/loadmod.sh
+ echo "echo \"$DOLLAR1/morphix/commandsPostX.sh $DOLLAR1 \" >> /morphix/rc.m/S11PostX11.sh " >>$TMP_DIR/minimod/morphix/loadmod.sh
+ echo "chmod a+x /morphix/rc.m/S11PostX11.sh " >>$TMP_DIR/minimod/morphix/loadmod.sh
fi
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.