-
-
Save SheetJSDev/3468d93b7974fb57b48635e6777afde6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUTPATH=${1:-/tmp/out/} | |
doit() { | |
echo "$1" "$2" | |
hcopy -r "$1:*" "$2" 2>&1 >/dev/null | sed 's/hcopy: "//g; s/": is a directory//g' | while read x; do | |
NEWPATH="$OUTPATH/${x//://}" | |
mkdir -p "$NEWPATH" | |
doit "$x" "$NEWPATH" | |
done | |
} | |
mkdir -p "$OUTPATH" | |
doit "" "$OUTPATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment