Docker
Added option to pass multiple root paths as comma separated list in ROOT_PATH
This commit is contained in:
parent
bab2171caf
commit
94ea9c363b
1 changed files with 17 additions and 1 deletions
18
docker/immich_auto_album.sh
Executable file → Normal file
18
docker/immich_auto_album.sh
Executable file → Normal file
|
@ -1,6 +1,22 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
args="-u $ROOT_PATH $API_URL $API_KEY"
|
||||
# parse comma separated root paths
|
||||
root_paths=$(echo "$ROOT_PATH" | tr "," "\n")
|
||||
main_root_path=""
|
||||
additional_root_paths=""
|
||||
for path in ${root_paths}; do
|
||||
if [ -z "$main_root_path" ]; then
|
||||
main_root_path="$path"
|
||||
else
|
||||
additional_root_paths="-r $path $additional_root_paths"
|
||||
fi
|
||||
done
|
||||
|
||||
args="$main_root_path $API_URL $API_KEY"
|
||||
|
||||
if [ ! -z "$additional_root_paths" ]; then
|
||||
args="$additional_root_paths $args"
|
||||
fi
|
||||
|
||||
if [ ! -z "$ALBUM_LEVELS" ]; then
|
||||
args="-a $ALBUM_LEVELS $args"
|
||||
|
|
Loading…
Add table
Reference in a new issue