diff --git a/mediacrush b/mediacrush index d40f103..4b0cf7e 100755 --- a/mediacrush +++ b/mediacrush @@ -35,7 +35,7 @@ if [[ $# -eq 0 ]]; then exit 1 fi -GETOPT=`getopt -o hars: --longoptions help,version,album,dry-run,open,recursive,server: -- "$@"` +GETOPT=`getopt -o hars: --longoptions help,version,album,dry-run,open,recursive,interactive,non-interactive,server: -- "$@"` if [[ $? != 0 ]]; then exit 1 fi @@ -72,6 +72,14 @@ while true; do server="$2" shift 2 ;; + --interactive) + interactive=true + shift 1 + ;; + --non-interactive) + interactive=false + shift 1 + ;; --) shift break @@ -155,10 +163,12 @@ upload_url() { } upload() { - if [ -t 1 ]; then - interactive=true - else - interactive=false + if [ -z $interactive ]; then + if [ -t 1 ]; then + interactive=true + else + interactive=false + fi fi for f in "$@"; do