Arbeitsverzeichnis für Pendel-Redaktion. Beinhaltet Skripte sowie alle Pendel-Inhalte.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
750 B

#!/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"