mirror of https://github.com/captn3m0/Scripts.git
Adds yadisk - A script to download stuff from Yandex Disk
This commit is contained in:
parent
8cfeea8ea9
commit
36b9ec0869
|
@ -0,0 +1,10 @@
|
||||||
|
#!/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
|
Loading…
Reference in New Issue