juke: fix script to work with mntgen /mnt, fix "empty filename" error for jukefs
This commit is contained in:
parent
3e42a08988
commit
9f150d42a3
3 changed files with 5 additions and 9 deletions
|
@ -6,12 +6,10 @@ debug=0
|
||||||
tflag=''
|
tflag=''
|
||||||
wflag=''
|
wflag=''
|
||||||
host=''
|
host=''
|
||||||
kb=4096
|
|
||||||
flags=()
|
flags=()
|
||||||
sname=$user
|
sname=$user
|
||||||
if (! ~ $wide 1) {
|
if (! ~ $wide 1) {
|
||||||
flags=($flags -t)
|
flags=($flags -t)
|
||||||
kb=1024
|
|
||||||
}
|
}
|
||||||
while(! ~ $#* 0) {
|
while(! ~ $#* 0) {
|
||||||
switch ($1) {
|
switch ($1) {
|
||||||
|
@ -34,7 +32,7 @@ while(! ~ $#* 0) {
|
||||||
}
|
}
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
if (! test -e /mnt/playlist){
|
if (! test -f /mnt/playlist) {
|
||||||
if (! ~ $debug '0') echo mounting playlistfs
|
if (! ~ $debug '0') echo mounting playlistfs
|
||||||
if (! test -e /srv/playlist.$sname && ! ~ $host ''){
|
if (! test -e /srv/playlist.$sname && ! ~ $host ''){
|
||||||
import -a $host /srv /srv
|
import -a $host /srv /srv
|
||||||
|
@ -45,7 +43,7 @@ if (! test -e /mnt/playlist){
|
||||||
games/playlistfs -s $sname -d $debug
|
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 ''){
|
if (! test -e /srv/jukefs.$sname && ! ~ $host ''){
|
||||||
import -a $host /srv /srv
|
import -a $host /srv /srv
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,10 @@ debug=0
|
||||||
tflag=''
|
tflag=''
|
||||||
wflag=''
|
wflag=''
|
||||||
host=''
|
host=''
|
||||||
kb=4096
|
|
||||||
flags=()
|
flags=()
|
||||||
sname=$user
|
sname=$user
|
||||||
if (! ~ $wide 1) {
|
if (! ~ $wide 1) {
|
||||||
flags=($flags -t)
|
flags=($flags -t)
|
||||||
kb=1024
|
|
||||||
}
|
}
|
||||||
while(! ~ $#* 0) {
|
while(! ~ $#* 0) {
|
||||||
switch ($1) {
|
switch ($1) {
|
||||||
|
@ -34,7 +32,7 @@ while(! ~ $#* 0) {
|
||||||
}
|
}
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
if (! test -e /mnt/playlist){
|
if (! test -f /mnt/playlist) {
|
||||||
if (! ~ $debug '0') echo mounting playlistfs
|
if (! ~ $debug '0') echo mounting playlistfs
|
||||||
if (! test -e /srv/playlist.$sname && ! ~ $host ''){
|
if (! test -e /srv/playlist.$sname && ! ~ $host ''){
|
||||||
import -a $host /srv /srv
|
import -a $host /srv /srv
|
||||||
|
@ -45,7 +43,7 @@ if (! test -e /mnt/playlist){
|
||||||
games/playlistfs -s $sname -d $debug
|
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 ''){
|
if (! test -e /srv/jukefs.$sname && ! ~ $host ''){
|
||||||
import -a $host /srv /srv
|
import -a $host /srv /srv
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
</$objtype/mkfile
|
</$objtype/mkfile
|
||||||
<../mkinc
|
<../mkinc
|
||||||
|
|
||||||
CFLAGS = -DDEFAULTMAP="$DEFAULTMAP"
|
CFLAGS = -DDEFAULTMAP="/sys/lib/music/map"
|
||||||
TARG = jukefs
|
TARG = jukefs
|
||||||
BIN = /$objtype/bin/games
|
BIN = /$objtype/bin/games
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue