]> git.cameronkatri.com Git - tsssave.git/blobdiff - tsssave
Fix skipping
[tsssave.git] / tsssave
diff --git a/tsssave b/tsssave
index e171a12e2d32c6e9ea6c562506d04ddab0e31ee3..accccf288e7ed573721eb28abb8a0f8dfefffdf4 100755 (executable)
--- a/tsssave
+++ b/tsssave
@@ -62,7 +62,7 @@ for device in $(yq e '.devices | keys | .[]' ${config}); do
        
        for signed in $(curl -s https://api.ipsw.me/v4/device/${deviceid} | jq -re '.firmwares[] | select(.signed == true) | .buildid'); do
                version="$(curl -s https://api.ipsw.me/v4/device/${deviceid} | jq -re ".firmwares[] | select(.buildid == \"${signed}\") | .version")"
-               if [ -e ${output}/${version}/$(printf "%d\n" ${ecid})_${deviceid}_$(printf "${board}\n" | tr '[A-Z]' '[a-z]')_*-${signed}_*.shsh2 ]; then
+               if [ -e ${output}/${device}/${version}/$(printf "%d\n" ${ecid})_${deviceid}_$(printf "${board}\n" | tr '[A-Z]' '[a-z]')_*-${signed}_*.shsh2 ]; then
                        printf "Skipping %s...\n" ${signed}
                else
                        printf "Saving %s...\n" ${signed}
@@ -77,7 +77,7 @@ for device in $(yq e '.devices | keys | .[]' ${config}); do
        
        for signed in $(curl -sL https://api.m1sta.xyz/betas/${deviceid} | jq -re '.[] | select(.signed == true) | .buildid'); do
                version="$(curl -s https://api.m1sta.xyz/betas/${deviceid} | jq -re ".[] | select(.buildid == \"${signed}\") | .version")"
-               if [ -e ${output}/${version}/beta/$(printf "%d\n" ${ecid})_${deviceid}_$(printf "${board}\n" | tr '[A-Z]' '[a-z]')_*-${signed}_*.shsh2 ]; then
+               if [ -e ${output}/${device}/${version}/beta/$(printf "%d\n" ${ecid})_${deviceid}_$(printf "${board}\n" | tr '[A-Z]' '[a-z]')_*-${signed}_*.shsh2 ]; then
                        printf "Skipping %s...\n" ${signed}
                else
                        printf "Saving %s...\n" ${signed}