X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=rc%2Fbin%2Fjuke;h=a661c7f799d03f4e1f089043c8ee06d22852c143;hb=96b5d96b90c0d63bb0a5f170671689ea7e99ed5a;hp=f06961ee2ca56fd82c4cd9d9d8c41655a6d484f8;hpb=5e45406a0d63df3bc86c718d107bfe0123795d70;p=plan9front.git diff --git a/rc/bin/juke b/rc/bin/juke index f06961ee2..a661c7f79 100755 --- a/rc/bin/juke +++ b/rc/bin/juke @@ -1,17 +1,14 @@ #!/bin/rc - +rfork e wide=`{echo $vgasize | sed 's/(.*)x.*x.*/\1 > 240/' | hoc} - debug=0 tflag='' wflag='' host='' -kb=4096 flags=() sname=$user if (! ~ $wide 1) { flags=($flags -t) - kb=1024 } while(! ~ $#* 0) { switch ($1) { @@ -34,7 +31,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 +42,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 }