]> git.openpandora.org Git - pandora-libraries.git/commitdiff
Fixed pnd_run.sh so -m and -u work, yay for previewpics
authorskeezix <skeezix@flotsam-vm.(none)>
Wed, 10 Mar 2010 17:30:26 +0000 (12:30 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Wed, 10 Mar 2010 17:30:26 +0000 (12:30 -0500)
minimenu/TODO.txt
testdata/scripts/pnd_run.sh

index 0217f65d117f2ec3e99c4866ee5899248f13e7ac..690df186d0eae6e726681e02906a7198f8be50c7 100644 (file)
@@ -9,7 +9,6 @@
 - manual app rescan
 - conf: use real app searchpaths
 - About screen
-- redraw after deferred preview load
 
 - deploy..
   - .desktop for deply
index e59d73ddd30badcdae3a9bc9fc5897d695191065..37ef213f7826150f23678fd8a942a65612fecfce 100644 (file)
@@ -48,7 +48,7 @@ while true ; do
                *) echo "Error while parsing arguments!" ; exit 1 ;;
        esac
 done
- 
+
 if [ ! $PND ]; then #check if theres a pnd suplied, need to clean that up a bit more
        echo "Usage: pnd_run.sh -p your.pnd -e executeable [-a \"(arguments)\"] [ -s \"cd to folder inside pnd\"] [-b UID (name of mountpoint/pandora/appdata)] [-x close x before launching(script needs to be started with nohup for this to work]"
        exit 1
@@ -61,6 +61,10 @@ if [ ! $EXENAME ]; then
        fi
 fi
 
+if [ $(pidof X) ]; then 
+unset $nox
+fi
+
 fork () {
 echo in fork!
 if [ $nox ]; then #the app doesnt want x to run, so we kill it and restart it once the app quits
@@ -211,6 +215,7 @@ fi
  
 #clean up
 sudo rmdir /mnt/utmp/$BASENAME
+sudo rm /mnt/utmp/$BASENAME
 sudo umount /mnt/utmp/$BASENAME #umount union
 if [ $? -eq 0 ]; then # check if the umount was successfull, if it wasnt it would mean that theres still something running so we skip this stuff, this WILL lead to clutter if it happens, so we should make damn sure it never happens
        #umount the actual pnd
@@ -221,9 +226,9 @@ if [ $? -eq 0 ]; then # check if the umount was successfull, if it wasnt it woul
        #delete appdata folder and ancestors if empty
        sudo rmdir -p $MOUNTPOINT/pandora/appdata/$BASENAME/
        #delete tmp mountpoint
-       sudo rmdir /mnt/utmp/$BASENAME;
+       sudo rmdir /mnt/utmp/$BASENAME
        if [ $DFS = ISO ] || [ $DFS = Squashfs ]; then # check if we where running an iso, clean up loop device if we did
-               LOOP=$(sudo losetup -a | grep $PND | tail -n1 | awk -F: '{print $1}')
+               LOOP=$(sudo losetup -a | grep $(basename $PND) | tail -n1 | awk -F: '{print $1}')
                sudo /sbin/losetup -d $LOOP
                sudo rm $LOOP
        fi
@@ -243,9 +248,9 @@ fi
 
 if [ $nox ]; then
 echo forking now!
-fork &> /tmp/pndrun$BASENAME.out & 
+fork &> /tmp/pndrun$BASENAME$mount.out & 
 disown
 else
 echo Running with x, not disowning!
-fork &> /tmp/pndrun$BASENAME.out
+fork &> /tmp/pndrun$BASENAME$mount.out
 fi
\ No newline at end of file