-
Notifications
You must be signed in to change notification settings - Fork 1
命令使用
Yousong Zhou edited this page Nov 8, 2023
·
2 revisions
示例:mypan walk -p 10 /remote/dir bash walk.sh
- walk保证先对父目录执行walk.sh
-
-p 10
表示针对同一目录中的条目,最多同时起10个walk.sh进程进行处理
#!/bin/bash
based="$HOME/c"
handle() {
local path="$1"; shift
local isdir="$1"; shift
if test "$isdir" -gt 0; then
mkdir -p "$based/$path"
return 0
fi
name="${path##*/}"
case "$name" in
gocryptfs.*)
./mypan down "$path" "$based/$path"
;;
*)
touch "$based/$path"
;;
esac
}
eval "handle $(jq -r "[.path, .isdir] | @sh")"