ref: dfc22419eac1741b5655126826799f06346a37d5
parent: a21a11136bfd75f3092b04bac26dffbe567617e5
author: qwx <qwx@sciops.net>
date: Fri Jul 30 06:04:40 EDT 2021
mlu: checks and allow relative path
--- a/bin/mlu
+++ b/bin/mlu
@@ -1,8 +1,15 @@
-#!/bin/rc
+#!/bin/rc -e
+rfork n
if(! ~ $#* 2){
echo usage: $0 listname destdir
exit usage
}
+d=`{pwd}
9fs lists.9front.org
cd /n/lists.9front.org/lists/$1
-syncab /n/lists.9front.org/lists/$1 $2 | tee | rc
+d=`{cleanname -d $d $2}
+if(! test -d $d){
+ echo destination $d doesn''t exist
+ exit usage
+}
+syncab /n/lists.9front.org/lists/$1 $d | tee | rc