Created
June 29, 2018 13:14
-
-
Save ubergesundheit/83789d2cbd89732041f2cc6b80f4a779 to your computer and use it in GitHub Desktop.
Script to upload directly to iOS foobar 2000 Music folder
This file contains hidden or 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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
URL=${1:-} | |
if [[ -z "$URL" ]]; then | |
echo "USAGE: $0 URL TARGET-IP" | |
exit 1 | |
fi | |
shift | |
FILENAME="${URL##*/}" | |
if [[ -z "$FILENAME" ]]; then | |
echo "FILENAME is empty ?!" | |
exit 1 | |
fi | |
TARGET=${1:-} | |
if [[ -z "$TARGET" ]]; then | |
echo "USAGE: $0 URL TARGET-IP" | |
exit 1 | |
fi | |
curl -s "${URL}" | curl -T - "ftp://${TARGET}/foobar2000%20Music%20Folder/${FILENAME}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment