summaryrefslogtreecommitdiff
path: root/sh/syncmusic
diff options
context:
space:
mode:
Diffstat (limited to 'sh/syncmusic')
-rwxr-xr-xsh/syncmusic10
1 files changed, 7 insertions, 3 deletions
diff --git a/sh/syncmusic b/sh/syncmusic
index 84c7e5e..8cabaf1 100755
--- a/sh/syncmusic
+++ b/sh/syncmusic
@@ -1,15 +1,18 @@
+#!/bin/sh
REMOTEDIR=root@aberrantflux.xyz:/mnt/blockstorage/music
LOCALDIR=$(pwd)
echo "Remote directory is at $REMOTEDIR"
echo "Local dir is at $LOCALDIR"
echo "To sync from remote to local, enter d. To sync from local to remote, enter u. To cancel, enter c"
-read -p "Direction: " DIRECTION
+printf "Direction: "
+read DIRECTION
if [ $DIRECTION = d ]
then
COMMAND="rsync -avzP $REMOTEDIR/* $LOCALDIR/"
echo "About to run $COMMAND - enter y to continue, or n to cancel"
- read -p "Confirm: " CONFIRMATION
+ printf "Confirm: "
+ read CONFIRMATION
if [ $CONFIRMATION = y ]
then
rsync -avzP $REMOTEDIR/* $LOCALDIR/
@@ -20,7 +23,8 @@ if [ $DIRECTION = u ]
then
COMMAND="rsync -avzP $LOCALDIR/* $REMOTEDIR/"
echo "About to run $COMMAND - enter y to continue, or n to cancel"
- read -p "Confirm: " CONFIRMATION
+ printf "Confirm: "
+ read CONFIRMATION
if [ $CONFIRMATION = y ]
then
rsync -avzP $LOCALDIR/* $REMOTEDIR/