ref: 0cdc9ceeafeb4508828b8a8a1aed42b4cfae75e5
parent: 112f93382f14a8620470389c700b51a8c5136c17
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri May 25 03:12:05 EDT 2012
juke: fix script to work with mntgen /mnt, fix "empty filename" error for jukefs
--- a/rc/bin/juke
+++ b/rc/bin/juke
@@ -6,12 +6,10 @@
tflag=''
wflag=''
host=''
-kb=4096
flags=()
sname=$user
if (! ~ $wide 1) {flags=($flags -t)
- kb=1024
}
while(! ~ $#* 0) { switch ($1) {@@ -34,7 +32,7 @@
}
shift
}
-if (! test -e /mnt/playlist){+if (! test -f /mnt/playlist) {if (! ~ $debug '0') echo mounting playlistfs
if (! test -e /srv/playlist.$sname && ! ~ $host ''){import -a $host /srv /srv
@@ -45,7 +43,7 @@
games/playlistfs -s $sname -d $debug
}
}
-if (! test -w /mnt/juke) {+if (~ `{ls /mnt/juke >[2]/dev/null | sed '1q'} '') { if (! test -e /srv/jukefs.$sname && ! ~ $host ''){import -a $host /srv /srv
}
--- a/sys/src/games/music/juke.rc
+++ b/sys/src/games/music/juke.rc
@@ -6,12 +6,10 @@
tflag=''
wflag=''
host=''
-kb=4096
flags=()
sname=$user
if (! ~ $wide 1) {flags=($flags -t)
- kb=1024
}
while(! ~ $#* 0) { switch ($1) {@@ -34,7 +32,7 @@
}
shift
}
-if (! test -e /mnt/playlist){+if (! test -f /mnt/playlist) {if (! ~ $debug '0') echo mounting playlistfs
if (! test -e /srv/playlist.$sname && ! ~ $host ''){import -a $host /srv /srv
@@ -45,7 +43,7 @@
games/playlistfs -s $sname -d $debug
}
}
-if (! test -w /mnt/juke) {+if (~ `{ls /mnt/juke >[2]/dev/null | sed '1q'} '') { if (! test -e /srv/jukefs.$sname && ! ~ $host ''){import -a $host /srv /srv
}
--- a/sys/src/games/music/jukefs/mkfile
+++ b/sys/src/games/music/jukefs/mkfile
@@ -1,7 +1,7 @@
</$objtype/mkfile
<../mkinc
-CFLAGS = -DDEFAULTMAP="$DEFAULTMAP"
+CFLAGS = -DDEFAULTMAP="/sys/lib/music/map"
TARG = jukefs
BIN = /$objtype/bin/games
--
⑨