[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/scripts/amarok_live
From: Leo Franchi <angel666 () myrealbox ! com>
Date: 2005-06-30 18:51:43
Message-ID: 1120157503.810380.13513.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 430284 by lfranchi:
Greatly reduced the number of times the user needs to enter root password.
M +16 -2 amarok.live.remaster.part1.sh
M +0 -1 amarok.live.remaster.part2.sh
M +6 -6 amarok_live.py
--- trunk/extragear/multimedia/amarok/src/scripts/amarok_live/amarok.live.remaster.part1.sh \
#430283:430284 @@ -19,6 +19,13 @@
#
############################################################################
+
+cleanup () {
+ rm -rf $WORK/mklivecd
+ rm -rf $WORK/amarok.live
+ rm -rf $WORK/livecd_data*
+}
+
# We need to be root to mount the loopback
# check for root and exit if not
@@ -29,13 +36,13 @@
iso=`kdialog --getopenfilename /home "*.iso"`
if [ $iso = 0 ] ; then
- exit;
+ exit
fi
WORK=`kdialog --title "Choose working directory" --getexistingdirectory .`
if [ $WORK = 0 ] ; then
- exit;
+ exit
fi
# Determine if enough space
@@ -132,6 +139,13 @@
umount $WORK/amarok.livecd/
rmdir $WORK/amarok.livecd
+mkdir $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists
+chown 500:500 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists
+find $WORK/amarok.live/home/amarok/.kde/share/apps/ -type d -print0 | xargs -0 chmod \
+x +chmod -R 777 $WORK/amarok.live/music/
+chmod -R 777 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok
+#chmod -R 777 $WORK/mklivecd/
+
dcop --all-users amarok playlist popupMessage "Copying done. To add music to the \
amaroK livecd, select the tracks you wish to add in the playlist, and select \"Add to \
livecd\" from the right click menu. Please do not add more than about 380 mb, as then \
the resulting ISO will be too large to fit on a CD-ROM. Once you are done, select \
Create Remastered CD. Enjoy!"
else
--- trunk/extragear/multimedia/amarok/src/scripts/amarok_live/amarok.live.remaster.part2.sh \
#430283:430284 @@ -76,5 +76,4 @@
else
kdialog --title "amaroK livecd remaster" --sorry "You must run this script as root. \
Try running 'kdesu sh amarok.live.remaster.part1.sh' instead."
-
fi
--- trunk/extragear/multimedia/amarok/src/scripts/amarok_live/amarok_live.py \
#430283:430284 @@ -183,7 +183,7 @@
self.dia = ConfigDialog()
path = self.dia.readConfig()
- os.system("kdesu 'rm -rf %s/amarok.live/music/*'" % path)
+ os.system("rm -rf %s/amarok.live/music/* \
%s/amarok.live/home/amarok/.kde/share/apps/amarok/playlists" % path)
def stop( self ):
@@ -234,11 +234,11 @@
files = files.strip()
- os.system("kdesu kfmclient copy %s file://%s/amarok.live/music/" % (files, \
path)) + os.system("kfmclient copy %s file://%s/amarok.live/music/" % (files, \
path))
import random
suffix = random.randint(0,10000)
- os.system("kdesu mkdir \
%s/amarok.live/home/amarok/.kde/share/apps/amarok/playlists/" % path) + \
os.system("mkdir %s/amarok.live/home/amarok/.kde/share/apps/amarok/playlists/" % \
path) m3uOut = open("/tmp/amarok.live.%s.m3u" % suffix, 'w')
m3u = m3u.strip()
@@ -246,7 +246,7 @@
m3uOut.close()
- os.system("kdesu mv /tmp/amarok.live.%s.m3u \
%s/amarok.live/home/amarok/.kde/share/apps/amarok/playlists/" % (suffix,path)) + \
os.system("mv /tmp/amarok.live.%s.m3u \
%s/amarok.live/home/amarok/.kde/share/apps/amarok/playlists/" % (suffix,path)) \
os.system("rm /tmp/amarok.live.%s.m3u" % suffix)
@@ -274,8 +274,7 @@
for file in files:
allfiles += file + " "
allfiles = allfiles.strip()
- os.system("kdesu -t kfmclient copy %s file://%s/amarok.live/music/" % \
(allfiles, path))
- #print "kdesu -t kfmclient copy %s file://%s/amarok.live/music/" % \
(allfiles, path) + os.system("kfmclient copy %s \
file://%s/amarok.live/music/" % (allfiles, path))
def createCD( self ):
@@ -297,6 +296,7 @@
y = y.strip()
if y == "end": # user said no more, clear path
self.dia.save("")
+ fd.close()
############################################################################
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic