diff options
author | lookshe <lookshe@lookshe-laptop.(none)> | 2014-09-21 00:17:28 +0200 |
---|---|---|
committer | lookshe <lookshe@lookshe-laptop.(none)> | 2014-09-21 00:17:28 +0200 |
commit | ce0e78eaeb3b2311327505789e7d56f89711add1 (patch) | |
tree | a4762905beb66cdedccb7d09cf2d9b7fe848e0cc /rsync_pics.sh | |
parent | c6fc72134f3e11bab508e6bc01517d4e6804bc01 (diff) |
scripts from laptop for copying and syncing pictures from camera and a script for killing a process at a specific time
Diffstat (limited to 'rsync_pics.sh')
-rwxr-xr-x | rsync_pics.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/rsync_pics.sh b/rsync_pics.sh new file mode 100755 index 0000000..a44c262 --- /dev/null +++ b/rsync_pics.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +usage() { + echo "Usage: $0 [-v] [-l]" + exit 0 +} + +### default values ### + +# folder for pictures +picdir="/home/lookshe/Bilder/d5100" + +# server path # +serverpath="192.168.1.33:/home/lookshe/bilder/" + +nicelevel=19 + +verbose=0 +bwlimit=0 + +# parse arguments # +for arg in "$@" +do +case $arg in + -v) + verbose=1 + ;; + -l) + bwlimit=1 + ;; + *) + usage + ;; +esac +done + +nice -n $nicelevel rsync -a -r $(if [ $verbose -eq 1 ]; then echo "-v"; fi) $(if [ $bwlimit -eq 1 ]; then echo "--bwlimit 1000"; fi) --progress "$picdir" "$serverpath" |