Skip to content

Instantly share code, notes, and snippets.

@641i130
Created January 3, 2023 05:35
Show Gist options
  • Save 641i130/8f3ee4602b2b3cade24a2c08472b6414 to your computer and use it in GitHub Desktop.
Save 641i130/8f3ee4602b2b3cade24a2c08472b6414 to your computer and use it in GitHub Desktop.
Sync music folder with android device running SSH
#!/bin/bash
# FOR USE WITH THIS APP:
# https://play.google.com/store/apps/details?id=com.arachnoid.sshelper&gl=US&pli=1
echo "Syncing music dump to phone!!!"
echo "Press enter to continue!"
read
folder_name=$(date +%d%m%Y)
cd /home/rei/ytdl/ && mkdir $folder_name || echo "Folder was made already!!"
mv *.mp3 $folder_name
read -p "Enter IP address: " ip
rsync -e 'ssh -p 2222' -Pauv $folder_name user@$ip:/data/data/com.arachnoid.sshelper/files/home/SDCard/ && echo "UPLOADED SUCCESSFULLY!!!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment