summaryrefslogtreecommitdiff
path: root/head.sh
diff options
context:
space:
mode:
Diffstat (limited to 'head.sh')
-rwxr-xr-xhead.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/head.sh b/head.sh
new file mode 100755
index 0000000..ccccb85
--- /dev/null
+++ b/head.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -o pipefail
+curl "$DRASL_BACKEND/session/minecraft/profile/$1" \
+ | jq -r '.properties[] | select(.name == "textures") | .value' \
+ | base64 -d \
+ | jq -r '.textures.SKIN.url' \
+ | xargs -n1 curl \
+ | magick - -scale $(($2 * 8)) -crop "$2"x"$2"+"$2"+"$2" -