diff --git a/yadisk b/yadisk new file mode 100755 index 0000000..ad2c333 --- /dev/null +++ b/yadisk @@ -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 \ No newline at end of file