Skip to content

Commit

Permalink
Docker
Browse files Browse the repository at this point in the history
Added option to pass multiple root paths as comma separated list in ROOT_PATH
  • Loading branch information
Salvoxia committed Apr 9, 2024
1 parent bab2171 commit 94ea9c3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docker/immich_auto_album.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 94ea9c3

Please sign in to comment.