local/bin/rshare: Always use woof when sharing a single file.
parent
ac1587b63d
commit
7681ac5f58
|
@ -76,7 +76,11 @@ EOF
|
|||
}
|
||||
|
||||
share_woof() {
|
||||
woof -c 9999 -p $PORT "$TARGET"
|
||||
if command -v guix >/dev/null 2>&1; then
|
||||
guix environment -C -N --ad-hoc woof -- woof -c 9999 -p $PORT "$TARGET"
|
||||
else
|
||||
woof -c 9999 -p $PORT "$TARGET"
|
||||
fi
|
||||
}
|
||||
|
||||
share_python() {
|
||||
|
@ -91,12 +95,10 @@ share_python() {
|
|||
fi
|
||||
}
|
||||
|
||||
if $OPT_HTTP; then
|
||||
if [ -f "$TARGET" ]; then
|
||||
share_woof "$TARGET"
|
||||
else
|
||||
share_python "$TARGET"
|
||||
fi
|
||||
if [ -f "$TARGET" ]; then
|
||||
share_woof "$TARGET"
|
||||
elif $OPT_HTTP; then
|
||||
share_python "$TARGET"
|
||||
else
|
||||
share_rsync
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue