Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/parser.php on line
66
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/lexer.php on line
292
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
22
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
44
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
208
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
236
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
290
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
323
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/handler.php on line
560
Deprecated: Function split() is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/lexer.php on line
510
Deprecated: Function split() is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/lexer.php on line
510
Deprecated: Function split() is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/lexer.php on line
510
Deprecated: Assigning the return value of new by reference is deprecated in
/home/www/web535/html/dokuwiki/inc/parser/xhtml.php on line
980
#!/bin/bash
#==============================================================================
# VERSION : 0.03
# LICENCE : GPL
# FILENAME: nikon-getimages.sh
# PURPOSE : Copy all images from my Nikon D70s DSLR to an certen directory which will be
# created by the script
# DATE : 2006-07-01
# REVISION: 2006-07-01
# AUTHOR : (c) 04.07.11 Bernd Luxenburger, bernd @ rlux.de
# URL : http://berndlux.de
# ORIGINAL: (c) 03.12.25 Bernd Luxenburger, bernd @ rlux.de
# USES : bash, gphoto http://www.gphoto.org/ (the canon version of this script)
#
# SYSTEM : GNU/LINUX
# =============================================================================
# CHANGELOG:
#
# --- 2006.07.01 03:15 V0.03
# * fork from canon-getimages to be used with the Nikon D70s
# --- 2004.02.15 16:30 V0.02
# + automatic generated directorys, if none
# is given an read time past
# --- 2003.12.25 18:15 V0.01
# * initial coding
#
# a script to get all pictures from my Nikon D70s to disk.
# bernd Lux 2006.07.01 03:15
# bernd @ berrndlux . de http://berndlux.de
# were to put subdirs with pictures
PICS=/home/bernd/Bilder
# Path of gphoto
#GPHOT=/usr/local/bin/gphoto2
#mountpath of the Camera (it is an US-Storage device)
MPATH=/CF-card
# --------------------------------------------------------------------
DIR="0"
# is there a dir as option?
if [ -n "$1" ] ; then
DIR=$PICS/$1
echo "Save in $DIR"
fi
if [ "$DIR" = "0" ]; then
# where to place the pitures?
echo "Wohin mit dem Bilder?"
echo -n "$PICS/"
read -t 12 BUF;
if [ ! -n "$BUF" ] ; then
echo "pech, nix angeben, die kommen in "
DIR=$PICS/"`date +%y.%m.%d`-TMP"
if [ -d $DIR ]; then
for i in 1 2 3 4 5 6 ;do
if [ ! -d $DIR ]; then
DIR=$PICS/"`date +%y.%m.%d`-TMP$i"
break;
fi
done;
fi
echo $DIR
else
DIR=$PICS/$BUF
echo "Save in $DIR"
fi
fi
# does the dir exist?
if [ -d $DIR ]; then
echo "$DIR existiert, überleg dir was anderes"
exit 1;
else
# make it!
mkdir $DIR
fi
# cd where to put the images, ther ar no options to
# teach gphoto to do the same
#cd $DIR
# but cp can do it :-D
# I choose the USB PTP camera, because
# the driver for the S50 ist in test phase,
# it allways leave the cam in a undefined stat,
# after downloading Images
#################################### run gphoto
#$GPHOT --camera "USB PTP Class Camera" -P
#$GPHOT -P
mount $MPATH;
cp -rv $MPATH/dcim/*/* $DIR;
umount $MPATH;
####################################
echo
if [ "$?" != 0 ]; then
echo "ERROR !!!!!!!! Fehler !!!!!!!!!"
# too dangerous
# rm -ri $DIR
exit 1;
fi
echo "FERTIG"
echo -e -n \\a
sleep 1;
echo -e -n \\a
sleep 1;
echo -e -n \\a
exit 0;