diff options
| author | preston <preston@openbsd-preston.prestonpan.tech> | 2023-03-08 15:11:40 -0800 |
|---|---|---|
| committer | preston <preston@openbsd-preston.prestonpan.tech> | 2023-03-08 15:11:54 -0800 |
| commit | 4aa1f1c37980dbdc1fdb2fa9e744788daac4d645 (patch) | |
| tree | f75efa40dddd0c4560ade28f22c3865a9d7fb98a /sh/syncmusic | |
| parent | 91aca0691f5856f46f92f104f37f1269fb1b0c77 (diff) | |
posix compliant
Diffstat (limited to 'sh/syncmusic')
| -rwxr-xr-x | sh/syncmusic | 10 |
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/ |
