toymaker.git

commit 0070cd6ff6827962c587bff86147ad8ee02d77be

Author: Adam Evyčędo <git@apiote.xyz>

fix listing last status

 get.sh | 2 +-


diff --git a/get.sh b/get.sh
index 56c4a4fa9244da5f103bf120ff6f4e8b2880fe7b..2837c03c6856270e940456354d607fa9570a0282 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/$toy/" -type d -mindepth 1 -maxdepth 1 | grep -E '[0-9]+' | sort -n | tail -n1 | sed "s|toys/$toy/||")
+	[ "$item" = 'latest' ] && item=$(find "toys/$toy/" -type d -mindepth 1 -maxdepth 1 | grep -E '[0-9]+' | sed "s|toys/$toy||" | sort -n | tail -n1 | sed "s|toys/$toy/||")
 	if [ -z "$item" ] || [ ! -d "toys/$toy/$item" ]
 	then
 		printf 'n;'