mirror of
https://github.com/captn3m0/Scripts.git
synced 2024-09-27 22:22:53 +00:00
10 lines
340 B
Bash
Executable File
10 lines
340 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Run as yadisk "https://yadi.sk/...." [wget-options go here]
|
|
# eg: yadisk https://yadi.sk/i/gQpV5T7c3Ncvp4 -O file.png --quiet --no-clobber
|
|
|
|
LINK=$(curl "https://cloud-api.yandex.net:443/v1/disk/public/resources/download?public_key=$1" | jq -r '.href')
|
|
shift
|
|
if [[ "$LINK" != "null" ]]; then
|
|
wget --no-verbose "$LINK" "$@"
|
|
fi |