]> git.lizzy.rs Git - plan9front.git/blobdiff - rc/bin/juke
merge
[plan9front.git] / rc / bin / juke
index f06961ee2ca56fd82c4cd9d9d8c41655a6d484f8..6a523d847aed4ee805bb286a4b7aa9e958441774 100755 (executable)
@@ -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) {
@@ -29,12 +26,12 @@ while(! ~ $#* 0) {
                sname=$2
                shift
        case -*
-               echo Usage: classical [-d level] [-t] [-h srvhost]
+               echo usage: juke [-d level] [-tw] [-s srv] [-h srvhost] >[1=2]
                exit usage
        }
        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
        }