7 changed files with 69 additions and 62 deletions
@ -1,40 +0,0 @@
|
||||
#!/bin/bash |
||||
SRC="/home/chris/Pictures/digikam/pendel" |
||||
DST="/home/chris/kollegen/pendel/in" |
||||
|
||||
# case in-sensitive matching |
||||
|
||||
shopt -s nocaseglob |
||||
if [ -z "$1" ] |
||||
then echo Missing pendel nr. E. g. Call 'import 023' |
||||
exit 0 |
||||
else |
||||
echo Importing pendel "$1"... |
||||
fi |
||||
if [ ! -e $DST/$1 ] |
||||
then echo Create $DST/$1 |
||||
mkdir $DST/$1 |
||||
fi |
||||
|
||||
# Copy images from Digikam album |
||||
i=0 |
||||
for file in $SRC/$1/*.jpg; do |
||||
imgs[i]="$file" |
||||
(( ++i )) |
||||
done |
||||
for file in "${imgs[@]}"; do |
||||
cp "$file" "$DST/$1" |
||||
done |
||||
|
||||
# # Copy tcx or gpx file from work directory |
||||
# for file in $SRC/$1/work/*.*x; do |
||||
# tcxs[i]="$file" |
||||
# (( ++i )) |
||||
# done |
||||
# for file in "${tcxs[@]}"; do |
||||
# cp "$file" "$DST/$1" |
||||
# done |
||||
|
||||
# List dir |
||||
echo Imported into "$DST/$1": |
||||
ls "$DST/$1" |
||||
|
After Width: | Height: | Size: 441 KiB |
|
|
After Width: | Height: | Size: 42 KiB |
Loading…
Reference in new issue