diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-05-25 07:12:05 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-05-25 07:12:05 +0200 |
commit | 9f150d42a3019a16546b8f1a6ed029ee6d67f492 (patch) | |
tree | d9b4eeef28b32a11dcaec6918777090e36108ec1 | |
parent | 3e42a0898885290e51db66e409ec5f2c8fa135af (diff) | |
download | plan9front-9f150d42a3019a16546b8f1a6ed029ee6d67f492.tar.xz |
juke: fix script to work with mntgen /mnt, fix "empty filename" error for jukefs
-rwxr-xr-x | rc/bin/juke | 6 | ||||
-rwxr-xr-x | sys/src/games/music/juke.rc | 6 | ||||
-rw-r--r-- | sys/src/games/music/jukefs/mkfile | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/rc/bin/juke b/rc/bin/juke index f06961ee2..6c84df8d4 100755 --- a/rc/bin/juke +++ b/rc/bin/juke @@ -6,12 +6,10 @@ debug=0 tflag='' wflag='' host='' -kb=4096 flags=() sname=$user if (! ~ $wide 1) { flags=($flags -t) - kb=1024 } while(! ~ $#* 0) { switch ($1) { @@ -34,7 +32,7 @@ while(! ~ $#* 0) { } 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 @@ if (! test -e /mnt/playlist){ 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 } diff --git a/sys/src/games/music/juke.rc b/sys/src/games/music/juke.rc index f06961ee2..6c84df8d4 100755 --- a/sys/src/games/music/juke.rc +++ b/sys/src/games/music/juke.rc @@ -6,12 +6,10 @@ debug=0 tflag='' wflag='' host='' -kb=4096 flags=() sname=$user if (! ~ $wide 1) { flags=($flags -t) - kb=1024 } while(! ~ $#* 0) { switch ($1) { @@ -34,7 +32,7 @@ while(! ~ $#* 0) { } 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 @@ if (! test -e /mnt/playlist){ 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 } diff --git a/sys/src/games/music/jukefs/mkfile b/sys/src/games/music/jukefs/mkfile index eec672c25..57c34c193 100644 --- 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 |