Skip to content

Commit

Permalink
Update main.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx committed Nov 29, 2024
1 parent 3030ae3 commit 12f4838
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ unzip $TEMP_DOWNLOAD_DIR/client.jar "assets/*" -d "$TEMP_DOWNLOAD_DIR/generated"
echo "Fetch asset index URL from \"$package_url\""
asset_index_url=$(curl -L $package_url | jq -r ".assetIndex.url")

assets_path=$(mkdir -p "$TEMP_DOWNLOAD_DIR/generated/assets")
assets_path="$TEMP_DOWNLOAD_DIR/generated/assets"
mkdir -p "$assets_path"

curl -L "$asset_index_url" | jq -r '.objects | to_entries[] | "\(.key) \(.value.hash)"' | while read -r path hash; do

Expand All @@ -44,6 +45,6 @@ curl -L "$asset_index_url" | jq -r '.objects | to_entries[] | "\(.key) \(.value.
echo "Saved \"$url\" to \"$destination\"."
done

ls -al $TEMP_DOWNLOAD_DIR
ls -al "$TEMP_DOWNLOAD_DIR/generated/assets"

exit 0

0 comments on commit 12f4838

Please sign in to comment.