toymaker.git

commit 2c26d4ba17fc6b10a41aa9e1eeadef8d1912795d

Author: Adam <git@apiote.xyz>

fix getting latest item

 get.sh | 2 +-


diff --git a/get.sh b/get.sh
index 82c3c118effdeebd5f87e95e28bea1f80e21b974..36c815729e6fef7580cb424c9ae16c8adb5f2a02 100644
--- a/get.sh
+++ b/get.sh
@@ -37,7 +37,7 @@ 	then
 		podman inspect "item_${toy}_${item}" | jq '.[0].State.ExitCode' > "toys/$toy/$item.exit"
 		podman rm "item_${toy}_${item}" >/dev/null 2>&1
 	fi
-	[ "$item" = 'latest' ] && item=$(find toys/toymaker/ -type d -mindepth 1 -maxdepth 1 | grep -E '[0-9]+' | sort -n | tail -n1 | sed 's|toys/toymaker/||')
+	[ "$item" = 'latest' ] && item=$(find "toys/$toy/" -type d -mindepth 1 -maxdepth 1 | grep -E '[0-9]+' | sort -n | tail -n1 | sed "s|toys/$toy/||")
 	if [ ! -d "toys/$toy/$item" ]
 	then
 		printf 'n;'