From 4aa1f1c37980dbdc1fdb2fa9e744788daac4d645 Mon Sep 17 00:00:00 2001 From: preston Date: Wed, 8 Mar 2023 15:11:40 -0800 Subject: posix compliant --- sh/syncmusic | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sh/syncmusic') 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/ -- cgit v1.3.1